当前位置: 首页 > 文档资料 > JAVA AWT 中文文档 >

LayoutManager

优质
小牛编辑
124浏览
2023-12-01

介绍 (Introduction)

界面LayoutManager用于为知道如何布置容器的类定义接口。

类声明

以下是java.awt.LayoutManager接口的声明:

public interface LayoutManager

接口方法 (Interface methods)

SN方法和描述
1

void addLayoutComponent(String name, Component comp)

如果布局管理器使用每个组件的字符串,则将组件comp添加到布局中,并将其与name指定的字符串相关联。

2

void layoutContainer(Container parent)

布置指定的容器。

3

Dimension minimumLayoutSize(Container parent)

在给定组件包含的组件的情况下,计算指定容器的最小大小尺寸。

4

Dimension preferredLayoutSize(Container parent)

在给定包含的组件的情况下,计算指定容器的首选大小尺寸。

5

void removeLayoutComponent(Component comp)

从布局中删除指定的组件。