KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > sqlprofiler > gui > MainTabbedPanel


1 /*
2  * Copyright (C) Jahia Ltd. All rights reserved.
3  *
4  * This software is published under the terms of the Jahia Open Software
5  * License version 1.1, a copy of which has been included with this
6  * distribution in the LICENSE.txt file.
7  */

8 package org.jahia.sqlprofiler.gui;
9
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 JavaDoc tabs[] = {"Profiler", "Logger" };
25     JTabbedPane jTabbedPane1 = new JTabbedPane();
26
27     public MainTabbedPanel() {
28         try {
29             jbInit();
30         }
31         catch(Exception JavaDoc ex) {
32             ex.printStackTrace();
33         }
34     }
35
36     void jbInit() throws Exception JavaDoc {
37         this.setLayout(borderLayout1);
38     }
39
40     public void addTab(String JavaDoc name, JPanel panel, String JavaDoc tip) {
41         jTabbedPane1.addTab(name, null, panel, tip);
42     }
43
44     public void finishTabs() {
45         jTabbedPane1.setSelectedIndex(0);
46         this.add(jTabbedPane1, BorderLayout.CENTER);
47     }
48
49 }
Popular Tags