wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Border Layout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Border Layout" Watch "Border Layout" New topic
Author

Border Layout

Thiru Thangavelu
Ranch Hand

Joined: Aug 29, 2001
Posts: 219
True or False.
The BorderLayout manager only allows a single component to be added to each sector.


Thanks,<br />Thiru<br />[SCJP,SCWCD,SCBCD]
Swati Gupta
Ranch Hand

Joined: May 28, 2002
Posts: 106
It's true. In five sections we can add five components but as container is a component so we can add a panel(or other container)in any region and in this container we can add other components This is very useful.
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
I believe that's a true statement. Of course, you are free to put a panel, which could contain more components in any of the segments.
Corey


SCJP Tipline, etc.
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
True. But the one Componment can be a Container such as a Panel.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Paul Villangca
Ranch Hand

Joined: Jun 04, 2002
Posts: 133
Doesn't the problem imply that when you add more than one component to a sector, an error will result? Then the answer would be false, 'coz the old component would only be replaced by the newer component.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Actually, you can add as many components as you want to a container managed by a BorderLayout, but only the last five ones you added will be retained and displayed within the Container. Adding more than one component per sector does not result in an error.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Border Layout