See the following: A Visual Guide to Layout Managers . Using the appropriate layout for the JPanel will give you much more control on where things are displayed.