Forums Register Login

Layout with fixed heighs and gaps.

+Pie Number of slices to send: Send

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!
2
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Thank you, Maneesh!

This worked.
Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 516 times.
Similar Threads
Layout manager problem (horizontal & vertical boxes)
Can't get my Gridbag Layout Components to display how I want
Problems resizing using a split pane divider.
Left padding numbers
Specify exact height of panel or component
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:16:00.