Documentation
CardLayout
The card layout manager treats each component in the container as a card. Only one card is visible at a time. The container acts as a stack of cards. The first component added to a CardLayout object is the visible component when the container is first displayed.
CardLayout is part of the standard Java distribution.
Layout properties¶
A container with this layout manager has following layout properties:
| Property Name | Description |
|---|---|
| horizontal gap | The horizontal gap at the left and right edges. Default is 0. |
| vertical gap | The vertical gap at the top and bottom edges. Default is 0. |
Constraints properties¶
A component contained in a container with this layout manager has following constraints properties:
| Property Name | Description |
|---|---|
| Card Name | Identifier that can be used to make
a card visible. See API documentation for CardLayout.show(Container,
String). |
