• 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

Nested Layouts

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to nest 2 GridLayouts in a BorderLayout which was nested in another BorderLayout but can't seem to make it work....
Does anyone have suggestions?
Erik Dark
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It should work. I have nested lots of things in
GridBagLayout before.
Can you post an example of your code?
Thanks,
Joe
 
Erik Dark
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The labels should be besides the scrollbars in the south...
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't place anything in the south. You create a panSouth panel add it to your main layout but do not add anything to it. You place 2 items in the center. I have reformatted your code a little and placed some comments in it. Updated to what I think you wanted.

[ January 29, 2002: Message edited by: Paul Stevens ]
 
Erik Dark
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Paul!
I'm quite new to awt/swing and puzzled my brain out to get what you seem to have done in...
It's not only the result but I see where I was mistaken. Thanks.

Erik Dark
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you wanted more normal sized buttons, you could place a panel with vertical box layout in the east and place your buttons on it. You were close.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic