Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Swing Gridlayout VERTICAL constraint

Is it possible to add components in a Gridlayout verticaly ? I mean the next one above the previous one ?

Thank you

like image 270
Vincent Roye Avatar asked Dec 01 '25 13:12

Vincent Roye


1 Answers

No, there is no layout that allows you to stack vertically from the bottom up, at least that I'm aware of. If you want vertical stacking you can either use a GridLayout with a single column or a BoxLayout with a vertical axis. By nesting panels and combining layouts you should easily get what you need, e.g. panels with a vertical layout all laid out in a horizontal container.

like image 120
Paul Avatar answered Dec 04 '25 04:12

Paul