Aspects


vs


Boxlayout

BoxLayout is a Java Swing layout manager that allows multiple components to be laid out either vertically or horizontally.

Gridbaglayout

The GridBagLayout is a flexible Java Swing layout manager that aligns components vertically, horizontally or along their baseline without requiring that the components be of the same size

Others

Quality Example
Easier solution

"Although madprogrammers comment to use a gridbaglayout is an easier solution but knowing about glue and struts can be helpful for customizing the layout of a boxlayout"

from question "How to Center JButtons in a centered JLabel in a BoxLayout?"

Easier

"Boxlayout is far easier than gridbaglayout because you don t have to learn how to specify constraints"

from question "A java sidebar with GridBagLayout"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0