Creating a UI with nested layouts
Let's finish the top section of the UI.
JComboBox
components and change its layout to FlowLayout
. Notice that the components in this panel move to the center. This is the default alignment for FlowLayout
.
FlowLayout
object and change the properties to the following values:
alignment
= LEFT
hgap
= 10
vgap
= 2
BorderLayout
.
constraints
property to North.
constraints
property is South.