I've been tasked with designing a basic UI in Java using Swing but I'm stuck with laying it out. I want to create something similar to this but my attempts at using GridBagLayout have resulted in something very messy. Can anyone offer some tips on how I can lay out my GUI like this?
I have a JTabbedPane to which I add two tabs, and to each of those two tabs I add a JPanel containing my controls.

I would recommend that
Here's what I would recommend:
JPanel pTextBox with GridLayout(3, 2) to hold all of your labels + textboxesJPanel pButtons with GridLayout(1, 3) or BoxLayout(horizontal) hold all of your buttonsJPanel pAll with BoxLayout(vertical) to hold pTextBox, pButtons and the Table.Also check out: http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html to compare exactly what you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With