Hi

You need to specify a layout for displaying swing components.
Say for eg you can set the frame layout to flowlayout (Flowlayout simply lays out components in a single row,)
use this statement...