介绍
接口LayoutManager 知道如何布局容器类,用于定义接口。
类的声明
以下是声明的java.awt.LayoutManager接口:
public interface LayoutManager
接口中的方法
| S.N. | 方法和说明 |
|---|---|
| 1 |
void addLayoutComponent(String name, Component comp) If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name. |
| 2 |
void layoutContainer(Container parent) Lays out the specified container. |
| 3 |
Dimension minimumLayoutSize(Container parent) Calculates the minimum size dimensions for the specified container, given the components it contains. |
| 4 |
Dimension preferredLayoutSize(Container parent) Calculates the preferred size dimensions for the specified container, given the components it contains. |
| 5 |
void removeLayoutComponent(Component comp) Removes the specified component from the layout. |
上一篇:
AWT 布局(Layouts)
下一篇:
LayoutManager2 接口
