Class OverlappingLayout

  • All Implemented Interfaces:
    LayoutManager, LayoutManager2, Serializable

    public class OverlappingLayout
    extends Object
    implements LayoutManager2, Serializable
    A CardLayout object is a layout manager for a container. It treats each component in the container as a card. Only one card is visible at a time, and 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.

    The ordering of cards is determined by the container's own internal ordering of its component objects. CardLayout defines a set of methods that allow an application to flip through these cards sequentially, or to show a specified card. The addLayoutComponent(java.awt.Component, java.lang.Object) method can be used to associate a string identifier with a given card for fast random access.

    Since:
    JDK1.0
    Version:
    %I% %G%
    See Also:
    Container, Serialized Form
    • Constructor Detail

      • OverlappingLayout

        public OverlappingLayout()
        Creates a new card layout with gaps of size zero.
      • OverlappingLayout

        public OverlappingLayout​(int hgap,
                                 int vgap)
        Creates a new card layout with the specified horizontal and vertical gaps. The horizontal gaps are placed at the left and right edges. The vertical gaps are placed at the top and bottom edges.
        Parameters:
        hgap - the horizontal gap.
        vgap - the vertical gap.