
- 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
廣告