• Post Reply Bookmark Topic Watch Topic
  • New Topic

Layout with fixed heighs and gaps.  RSS feed

 
Vlad Shelkovtsev
Greenhorn
Posts: 4
Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello everyone!

I'm trying to build a GUI that must look lik on the image above. There must be three JPanles, the one above, with buttons and combo boxes, must have fixed height and all three must have fixed vertical gaps between them. I'm trying laout after layout but somehow it's not working. I'm allowed to use only standard Swing layouts.

Could you please give me some hint on how to solve that probelm. If there is a solution at all...

Thank you in advance!
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem, I would consider nesting the layouts.
Outermost panel would have a BorderLayout which would accommodate the button panel on the north and the twin panels at the center.
Then the center panels could be inside a GridLayout which is then added to the center mentioned above.
Both these layouts support the hGap and vGaps

You might also want to consider MigLayout
 
Vlad Shelkovtsev
Greenhorn
Posts: 4
Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Maneesh!

This worked.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!