Laying out the components in a container is strictly married to the LayoutManager that is used. Frames contentpanes use BorderLayout by default, anything added to BorderLayout by calling single param add(Component component) is added to BorderLayout´s CENTER. If no other components are added, the single one will thus consume whole of the available space.

Use a LayoutManager that fits your purpose, check up on BoxLayout and FlowLayout.
Remember that you can use multiple LayoutManagers to construct wgat you want.
Remember that you can use transparent, non focusable components as fillers.

As a last resort, you can always override the getMaximumSize() and getMinimumSize() methods of a component. This you however should do, when there is ample reason to do so.