FlowLayout

FlowLayout arranges components in rows from left to right, and then top to bottom using the each component's natural, preferredSize. FlowLayout lines up as many components as it can in a row, then moves to a new row. Typically, FlowLayout is used to arrange buttons on a panel.

Example

You can choose how to arrange the components in the rows of a FlowLayout container by specifying an alignment justification of left, right, or center. You can also specify the amount of gap (horizontal and vertical spacing) between components and rows.

You can change the alignment and gap properties from the Component Inspector when you're using the UI Designer.