I'm using flow layout.
Then you need to use a different layout. One that allows you to display components horizontally and vertically.
The easiest would be a GridLayout, but then all components will be displayed at the same size. Another option is a GridBagLayout which give you more flexibility but is more complex to use.
Read the section from the Swing tutorial on Layout Managers and experiment with the different layouts to see what you want to use.