Article View: borland.public.jbuilder.java.language
Article #18507Re: Removing a JTabbedPane tab and its components
From: Richard Wilkman
Date: Mon, 15 Jun 1998 00:00
Date: Mon, 15 Jun 1998 00:00
48 lines
1978 bytes
1978 bytes
Anne: It sounds like there are some heavyweight components still in the mix. -Rich Anne Ritchie wrote: > > Help.... > > I'm having a curious problem with the JTabbedPane. After removing a tab its > component is sometimes still visible and only gets removed by clicking on a > different tab and back. > > Using the following code I remove the selected tab. > > int i = jTabbedPane1.getSelectedIndex(); > jTabbedPane1.removeTabAt(i); > repaint(); > > When tabs are removed from right to left there is no problem since the index > is decremented and the selected tab's index is different from the removed > tab's index. When removing a tab from left to right or from the middle, the > tab is removed, but its components are still visible, because the newly > selected tab has the same index as the removed tab... > > Anybody resolved this one? > > TIA > > Anne Ritchie > aritchie@oriental.com -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Rich Wilkman Senior Quality Assurance Engineer Borland JBuilder Team If you see something that looks like an opinion up there, it's mine and mine alone. Mail sent to me from the newsgroups won't bounce but will be ignored. If I have time, I'll respond, but you have a better chance if you confine your posts to the newsgroups =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID:
<35854E82.B2B8C024@inprise.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6m3er5$3rj4@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9b97d672ba7e6d60 X-Google-Attributes: gidf74b3,public From: Richard Wilkman <rwilkman@inprise.com> Subject: Re: Removing a JTabbedPane tab and its components Date: 1998/06/15 Message-ID: <35854E82.B2B8C024@inprise.com> X-Deja-AN: 362871109 Content-Transfer-Encoding: 7bit References: <6m3er5$3rj4@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language