Article View: borland.public.jbuilder.java.swing
Article #9476Re: How to implement zorder on swing component ...
From: mus
Date: Mon, 27 Mar 2000 00:00
Date: Mon, 27 Mar 2000 00:00
32 lines
1912 bytes
1912 bytes
Yup ... it work.... just remove the component and then re add at 0 index. thanks ....... John P. McGrath <JPMcGrath@fast.net> wrote in message news:MPG.134884f9c801333b989828@forums.borland.com... > On Sat, 25 Mar 2000 15:07:37 -0800, mus wrote: > > > > > anyone seen code/way to set order of swing componet. > > > > (Using null layout container) ..like zOrder in VB. > > > > > > You can right click on the component in the designer, and select > > > "Move to First" or "Move to Last". > > > > What i realy mean is to set zorder at runtime :)))) > > Components are stored in a list in their parent Container, and the order > of Components in this list is the controls the order in which the > components are painted. I believe it also affects the tabbing order for > AWT, but Swing uses a different mechanism for tabbing. > > The Container add() method adds a Component to the end of the list. > There is a variant of add() that takes an index parameter, allowing you > to add the component anywhere in the list. > > If you wish to modify the order, you will have to remove the Component, > then add it at the new location. > > -- > John P. McGrath > <JPMcGrath@fast.net> > <jpm@nscs.fast.net>
Technical Details
Message-ID:
<8bmljc$5573@bornews.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8bh46s$e099@bornews.borland.com> <MPG.13461d603cdfc0b1989826@forums.borland.com> <8bho0t$mi71@bornews.borland.com> <MPG.134884f9c801333b989828@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,ff57dde69e69246e X-Google-Attributes: gid111d45,public From: "mus" <mustafa@mimos.my> Subject: Re: How to implement zorder on swing component ... Date: 2000/03/27 Message-ID: <8bmljc$5573@bornews.borland.com> X-Deja-AN: 602805111 References: <8bh46s$e099@bornews.borland.com> <MPG.13461d603cdfc0b1989826@forums.borland.com> <8bho0t$mi71@bornews.borland.com> <MPG.134884f9c801333b989828@forums.borland.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Organization: mimos X-MSMail-Priority: Normal Reply-To: "mus" <mustafa@mimos.my> Newsgroups: borland.public.jbuilder.java.swing