public interface LayoutManager
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.
Container,
JComponent.isOptimizedDrawingEnabled()
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(String
If the layout manager uses a per-component string, adds the component
comp to the layout, associating it with the string specified by
name.
|
void |
layoutContainer(Container
Lays out the specified container.
|
Dimension |
minimumLayoutSize(Container
Calculates the minimum size dimensions for the specified container, given the components it contains.
|
Dimension |
preferredLayoutSize(Container
Calculates the preferred size dimensions for the specified container, given the components it contains.
|
void |
removeLayoutComponent(Component
Removes the specified component from the layout.
|
void addLayoutComponent(Stringname, Component comp)
comp to the layout, associating it with the string specified by
name.
name - the string to be associated with the component
comp - the component to be added
void removeLayoutComponent(Componentcomp)
comp - the component to be removed
DimensionpreferredLayoutSize(Container parent)
parent - the container to be laid out
minimumLayoutSize(java.awt.Container)
DimensionminimumLayoutSize(Container parent)
parent - the component to be laid out
preferredLayoutSize(java.awt.Container)
void layoutContainer(Containerparent)
parent - the container to be laid out