Use GridLayout (AWT)

You can use the visual editor for Java to layout a class using GridLayout.

The layout manager java.awt.GridLayout lays out components in a grid of equal-sized rectangles in rows and columns. You can set the number of rows and columns that a GridLayout will contain. As components are added, they are added in order based on the componentOrientation: right to left, or left to right.

 

Parent topic

Swing and AWT layout managers

 

Related concepts

Layout managers and containers

 

Related tasks

Using BorderLayout
Using BoxLayout
Using CardLayout
Using FlowLayout
Using GridBag layout