JPanels are both components and containers.
As a component they can be placed inside containers (such as
and as a container they can contain other
Each panel has its own layout manager which may be any of several types.
Nest panels within panels to control the layout of complicated user interfaces.
At right is a sample user interface.
Assume that the labels are associated with the text fields.