• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Border Layout

 
Thiru Thangavelu
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True or False.
The BorderLayout manager only allows a single component to be added to each sector.
 
Swati Gupta
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True. But the one Componment can be a Container such as a Panel.
 
Paul Villangca
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic