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, javax.swing.JComponent#isOptimizedDrawingEnabled
| Modifier and Type | Method and Description |
|---|---|
| public void | addLayoutComponent(String
the string to be associated with the component name, Component the component to be added comp)If the layout manager uses a per-component string,
adds the component |
| public void | |
| public Dimension | Returns: the minimum dimension for the containerthe component to be laid out parent)Calculates the minimum size dimensions for the specified container, given the components it contains. |
| public Dimension | Returns: the preferred dimension for the containerthe container to be laid out parent)Calculates the preferred size dimensions for the specified container, given the components it contains. |
| public void | removeLayoutComponent(Component
the component to be removed comp)Removes the specified component from the layout. |
| addLayoutComponent | back to summary |
|---|---|
| public void addLayoutComponent(String name, Component comp) If the layout manager uses a per-component string,
adds the component | |
| layoutContainer | back to summary |
|---|---|
| public void layoutContainer(Container parent) Lays out the specified container.
| |
| minimumLayoutSize | back to summary |
|---|---|
| public Dimension minimumLayoutSize(Container parent) Calculates the minimum size dimensions for the specified container, given the components it contains.
| |
| preferredLayoutSize | back to summary |
|---|---|
| public Dimension preferredLayoutSize(Container parent) Calculates the preferred size dimensions for the specified container, given the components it contains.
| |
| removeLayoutComponent | back to summary |
|---|---|
| public void removeLayoutComponent(Component comp) Removes the specified component from the layout.
| |