Java Vertical Layout


I need to position a JLabel over some JButtons, vertically, like a game menu. They should all be centered. I already downloaded MigLayout, but I'm not sure how to use that, so I just want a way to position my components vertically and centered, MigLayout or not. Also, I don't want to use a IDE GUI designer.

Best Solution

You might use a (single column) GridLayout or BoxLayout for this. See Using Layout Managers & A Visual Guide to Layout Managers for more tips, ideas and working source.