Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which layoutmanager to use?

I'd like to create a JPanel in java with a layout similar to the one below. Any ideas?

enter image description here

like image 805
user720491 Avatar asked Apr 20 '26 22:04

user720491


2 Answers

Use a vertical BoxLayout and set the alignment of items on each row. (Make each row its own JPanel)

Another option is to use a SpringLayout or a GridBoxLayout and setup spacing for each indentation.

like image 82
jzd Avatar answered Apr 23 '26 11:04

jzd


Take a look at miglayout. With this layout manager, you will never have to ask which layout manager to use for a specific situation :-)

like image 31
Fortega Avatar answered Apr 23 '26 11:04

Fortega