Article View: borland.public.jbuilder.java.swing
Article #11096Re: JTabbed PAIN
From: Bob Lemm
Date: Thu, 15 Jul 1999 00:00
Date: Thu, 15 Jul 1999 00:00
39 lines
1634 bytes
1634 bytes
I'm not sure I completely understand what you're asking, but
// Create a tabbed pane
JTabbedPane tabbedPane = new JTabbedPane();
// Instantiate how many panels you'd like ... (I create the panels in a
different class and add all components, then I instantiate the panels as
needed)
myJPanel tab1 = new myJPanel();
myJPanel tab2 = new myJPanel();
// Now add the panels to the tabs.
tabbedPane.addTab("tab1",tab1);
tabbedPane.addTab("tab2",tab2);
That's about it.
JoAnn
Musa S Marasi <musa@codetech.com> wrote in message
news:378CE3E1.9CA1DDF6@codetech.com...
> We are experiencing a problem with the JTabbed Pane
>
> We would like to have a simple Tabbed structure consisting of 3 or 4
> panels and whenever a tab is pressed its respected panel along with the
> components should appear. However the problem is, no matter which tab
> we press, the panel associated with the selected component property
> comes up.
>
> i.e.
> JTabbedPane1.setSelectedComponent(JPanel1);
> thus only JPanel1 will show even when we change tabs.
>
> Please help
> Thanx
> Shabber
>
>
Technical Details
Message-ID:
<7mm5un$6la11@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<378CE3E1.9CA1DDF6@codetech.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,d3730f9758ff844b X-Google-Attributes: gid111d45,public From: "Bob Lemm" <rlemm@hiflite.com> Subject: Re: JTabbed PAIN Date: 1999/07/15 Message-ID: <7mm5un$6la11@forums.borland.com> X-Deja-AN: 501574649 References: <378CE3E1.9CA1DDF6@codetech.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Organization: Another Netscape Collabra Server User X-MSMail-Priority: Normal Newsgroups: borland.public.jbuilder.java.swing