Adding components one after another results in a UI that's hard to use, because the components all are somewhere. The components are ordered from top to bottom, each component in a separate "row".
To remedy this and provide you as developer with a possibility to layout components easily Swing has LayoutManager
s.
These LayoutManagers are covered more extensively in Introduction to Layout Managers as well as the separate Layout Manager topics: