• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

BorderLayout

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic