public abstract interface LayoutManager

Defines the interface for classes that know how to lay out Containers.

Swing's painting architecture assumes the children of a JComponent do not overlap. If a JComponent's LayoutManager allows children to overlap, the JComponent must override isOptimizedDrawingEnabled to return false.

public void addLayoutComponent(String, Component)

If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.

Parameters

String name: the string to be associated with the component

Component comp: the component to be added

public void layoutContainer(Container)

Lays out the specified container.

Parameters

Container parent: the container to be laid out

public Dimension minimumLayoutSize(Container)

Calculates the minimum size dimensions for the specified container, given the components it contains.

Parameters

Container parent: the component to be laid out

public Dimension preferredLayoutSize(Container)

Calculates the preferred size dimensions for the specified container, given the components it contains.

Parameters

Container parent: the container to be laid out

public void removeLayoutComponent(Component)

Removes the specified component from the layout.

Parameters

Component comp: the component to be removed