• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Layout Again

 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
Need ur help again......


p.setLayout(new GridLayout(3,0));
In the above code, if the line is changed to any other layout except Border, it works But when changed to BorderLayout only one button of panel p1 is displayed, which is not the case in Flow or Grid....
Can anyone explain.....
Thx in adv
Aruna
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you set the layout to Border Layout, you did not tell it where to put the buttons. Therefore each of them defaulted to the Center, each taking the entire area, laying on top of each other. You need to use the following syntax:
p.add(bSouth, BorderLayout.SOUTH); etc.
 
Aru Ven
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cindy,
By default the components are placed in CENTRE (Borderlayout) if not specified.
Then atleast the button which is added last should appear but none of them appear on the pael p which is added to the frame..
Can u explain me that.....
Thx
Aruna

[This message has been edited by Aru Ven (edited November 15, 2000).]
 
All that thinking. Doesn't it hurt? What do you think about this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic