Java Swing Panel layout
What you want is called the BoxLayout, which feeds UI elements in columns or rows. And then you can nest them one inside another, e.g. have one horizontal box layout panel as an element in another that is vertical (kind of like nested HTML tables). Here is a pretty decent tutorial about layout managers and it includes the BoxLayout.