01: /*
02: * Copyright (C) Jahia Ltd. All rights reserved.
03: *
04: * This software is published under the terms of the Jahia Open Software
05: * License version 1.1, a copy of which has been included with this
06: * distribution in the LICENSE.txt file.
07: */
08: package org.jahia.sqlprofiler.gui;
09:
10: import java.awt.*;
11: import javax.swing.*;
12:
13: /**
14: * <p>Title: SQL Profiler</p>
15: * <p>Description: </p>
16: * <p>Copyright: Copyright (c) 2003</p>
17: * <p>Company: Jahia Ltd</p>
18: * @author Serge Huber
19: * @version 1.0
20: */
21:
22: public class MainTabbedPanel extends JPanel {
23: BorderLayout borderLayout1 = new BorderLayout();
24: String tabs[] = { "Profiler", "Logger" };
25: JTabbedPane jTabbedPane1 = new JTabbedPane();
26:
27: public MainTabbedPanel() {
28: try {
29: jbInit();
30: } catch (Exception ex) {
31: ex.printStackTrace();
32: }
33: }
34:
35: void jbInit() throws Exception {
36: this .setLayout(borderLayout1);
37: }
38:
39: public void addTab(String name, JPanel panel, String tip) {
40: jTabbedPane1.addTab(name, null, panel, tip);
41: }
42:
43: public void finishTabs() {
44: jTabbedPane1.setSelectedIndex(0);
45: this.add(jTabbedPane1, BorderLayout.CENTER);
46: }
47:
48: }
|