A container is an abstract Java class that contains components. A window is an example of a container. A panel is a special type of container, because it is contained within a container, and is a container itself. Elements (like buttons, text areas, and smaller panels) are added to the panel, then the panel is added to the window. A GUI could have many layers of panels to achieve a certain look. By default, panels use flow layout (see Flow Layout example).