FlowLayout

This is a simple layout which places components from left to right in a row using the preferred component sizes until no space in the container is available. When no space is available a new row is started. Because this placement depends on the current size of the container you usually cannot guarantee in advance which row a component will be placed in.
FlowLayout is too simple to rely on in serious applications where we want to be sure, for instance, that a set of buttons will reside at the bottom of a dialog and not on it's right side. However, it can be useful as a pad for a single component to ensure that this component will be placed in the center of a container without expanding to the container’s maximum size. Note that FlowLayout is the default layout for all panels (the only exception is the content pane of a JRootPane which is always initialized with a BorderLayout).