public interface LayoutManager
Container
s。
摆动的绘画结构呈一JComponent
孩子不重叠。如果一个JComponent
的LayoutManager
允许儿童的JComponent
重叠,必须重写isOptimizedDrawingEnabled
返回false。
Modifier and Type | Method and Description |
---|---|
void |
addLayoutComponent(String name, Component comp)
如果布局管理器使用的每一个组件串,添加成分
comp 的布局,将其与指定的字符串
name 。
|
void |
layoutContainer(Container parent)
指定指定的容器。
|
Dimension |
minimumLayoutSize(Container parent)
计算指定容器的最小尺寸尺寸,给出它所包含的组件。
|
Dimension |
preferredLayoutSize(Container parent)
计算指定容器的首选大小尺寸,给出它所包含的组件。
|
void |
removeLayoutComponent(Component comp)
从布局中移除指定的组件。
|
void addLayoutComponent(String name, Component comp)
comp
的布局,将其与指定的字符串
name
。
name
要与组件关联的字符串
comp
-要添加的组件
void removeLayoutComponent(Component comp)
comp
-要移除的组件
Dimension preferredLayoutSize(Container parent)
parent
-容器被设置
minimumLayoutSize(java.awt.Container)
Dimension minimumLayoutSize(Container parent)
parent
-被设置的组件
preferredLayoutSize(java.awt.Container)
void layoutContainer(Container parent)
parent
-容器被设置
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.