JPanel
uses a FlowLayout
by default, which, as the name suggests, layouts out components one after the after, in a flow...
Two choices. Use a compound layout, using BorderLayout
as the base, create JPanel
that uses a GridLayout
for the radio buttons (using 0
rows and 1
column), add this to the CENTER
position of the base panel.
Create a second JPanel
using a FlowLayout
and your buttons to it. Add this to the SOUTH
position of the base pane.
Second choice is to use a GridBagLayout
Take a look at Laying out Components within a Container for more details