This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

BorderLayout

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the ordre preference for laying out the components
(North, South, East, West, )
Which components will be layed out first , and in what orer?
Milind.
 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They don't have an order. The default is CENTER so if you don't tell it NORTH, SOUTH, etc it will use CENTER.
 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you don't specify the position, it always takes CENTER and overlaps components. That means if you add 5 buttons consecutively , and then hope you see a fine layout along N,S,E,W and CENTER , you won't. You will see only the 5th button occupying the whole space, which is the default, CENTER.
Shree
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw a similar question in a mock exam asking about
order of preferenced if resized
the answer was
North,south,west,east,center.
I think If you resize a frame whose LayoutManager is BorderLayout
first of all, components on North and South position will be as wide as the frame width but components on west and east position won't be as high as frame height (becuse some of the height would've been occupied by the components on south and west)then remaining centeral space will be occupied by Center
component..


[This message has been edited by Nasir Khan (edited December 06, 2000).]
 
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!