Reputation: 1211
I want to make a JFrame with multiple components above the other - it should look like this:
What Layout should I use? How do I keep it as minimal as possible?
Thanks in advance!
Upvotes: 0
Views: 61
Reputation: 13123
You don't really give enough information, but what you give looks like BorderLayout to me -- image in the NORTH section, GridLayout in the CENTER, and a panel with your Label, TextField, and Button in the SOUTH. The CENTER will shrink and grow with the size of the frame. The bottom panel appears to have a BoxLayout with y-axis, and you can set x-axis centering on each component.
Upvotes: 3