You can use the visual editor to layout Swing components using BoxLayout on the X or Y axis.
BoxLayout is a Swing layout manager that allows multiple components to be laid out either vertically or horizontally. The components will not wrap, so, for example, a vertical arrangement of components will stay vertically arranged when the frame is resized.
For all directions, components are arranged in the same order as they were added to the container. BoxLayout attempts to arrange components at their preferred widths (for horizontal layout) or heights (for vertical layout). For a horizontal layout, if not all the components are the same height, BoxLayout attempts to make all the components as high as the highest component. If that's not possible for a particular component, then BoxLayout aligns that component vertically, according to the component's Y alignment. By default, a component has a Y alignment of 0.5, which means that the vertical center of the component should have the same Y coordinate as the vertical centers of other components with 0.5 Y alignment.
Similarly, for a vertical layout, BoxLayout attempts to make all components in the column as wide as the widest component. If that fails, it aligns them horizontally according to their X alignments.
To work with BoxLayout: