The CardLayout layout manager arranges components in a stack, like a stack of cards.
CardLayout treats each component in the container as a card, with only one card visible at a time. The ordering of cards is determined by the container's own internal ordering of its component objects, and the first component added to a CardLayout object is the visible component when the container is first displayed.
To work with CardLayout layout manager:
Parent topic: Swing and AWT layout managers
Related concepts
Layout managers and containers
Related tasks
Using BorderLayout
Using BoxLayout
Using FlowLayout
Using GridLayout (AWT)
Using GridBag layout