Article View: borland.public.jbuilder.java.swing
Article #10003Re: JTabbedPane initialization within Applet
From: Jeff Marendo
Date: Thu, 09 Dec 1999 00:00
Date: Thu, 09 Dec 1999 00:00
50 lines
2920 bytes
2920 bytes
Greg, All of the panels associated with the JTabbedPane are JPanels. I didn't know about the awt components showing through the lightweight components. That's something I need to read up on to become more familiar. As it is, we fixed the display problems by appropriately setting each JPanel associated with the tabs by using the setVisible( ) function. That clears up our display problem, but it seems like our initializations still might be messed up a bit. Thanks for the reply. Jeff Greg Hamer <ghamer@borland.com> wrote in message news:384F01D7.14A79317@borland.com... > Is Tab B heavyweight and Tab C swing stuff? It sounds like it is. Any awt > component will show right through the jTabbedPane (which is lightweight) as > soon as they are made visible. If you only use swing components it should > work. Also I would think that it would work if each tab was a heavyweight > container such a java.awt.Panel, as one heavywight component cannot show > through another heavyweight component, but I have not tried this. > > jeff wrote: > > > Hello, > > > > I've got some weird functionality happening with a JTabbedPane when my > > applet first loads. Background -> There are three tabs that are being > > made in jbInit(). These tabs are then added to the JTabbedPane. I've > > got some checks and print statements at the very end of jbInit to see > > how many tabs have been made and what their indexes are--that all looks > > fine (0 to 2). The tabs also appear in the proper order when the applet > > first runs. So my tabs appear in this order from left to right: Tab A, > > B, C. > > > > Ok, now, the real strange thing that is happening is this: each tab has > > a panel associated with it--fine. A's panel appears after the applet > > first finishes loading. However, if I click tab C anytime before > > clicking tab B, B's panel shows up when I click C. That is, I have to > > click tab B in order to get tab C's panel to show up for it. > > > > There is some other weird stuff happening with the listener made for the > > JTabbedPane, too, but I'm heading in another direction with that. Has > > anyone seen or dealt with anything similar to what I've described? If > > so, please let me know. Thanks. > > > > Jeff >
Technical Details
Message-ID:
<82ovi5$cnr11@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<384D20CA.38EEDDD4@commos.com> <384F01D7.14A79317@borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,eff5f1fd074ec5ff X-Google-Attributes: gid111d45,public From: "Jeff Marendo" <marendoj@commos.com> Subject: Re: JTabbedPane initialization within Applet Date: 1999/12/09 Message-ID: <82ovi5$cnr11@forums.borland.com> X-Deja-AN: 558683410 References: <384D20CA.38EEDDD4@commos.com> <384F01D7.14A79317@borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Organization: CommTech Corporation X-MSMail-Priority: Normal Reply-To: "Jeff Marendo" <marendoj@commos.com> Newsgroups: borland.public.jbuilder.java.swing