• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested Layouts  RSS feed

 
Erik Dark
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • 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
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator

The labels should be besides the scrollbars in the south...
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!