- SWING 教程
- SWING - 主页
- SWING - 概览
- SWING - 环境
- SWING - 控件
- SWING - 事件处理
- SWING - 事件类
- SWING - 事件侦听器
- SWING - 事件适配器
- SWING - 布局
- SWING - 菜单
- SWING - 容器
- SWING 有用资源
- SWING - 快速指南
- SWING - 有用资源
- SWING - 讨论
SWING - 布局管理器接口
简介
LayoutManager 接口用于为了解如何布局容器的类定义接口。
类声明
以下是 java.awt.LayoutManager 接口的声明 -
public interface LayoutManager
接口方法
| 序号。 | 方法和说明 |
|---|---|
| 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) 从布局中移除指定的组件。 |
swing_layouts.htm
广告