 <p>Concider using the fitting layout manager that will help you expand the way you want to when you add the components</p> <p><a href="http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html">http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html</a></p> <p>I think you are looking for the GridLayout and possibly use FlowLayout JPanels inside so that they dont expand, but this will depend on what you want to insert.</p>