- All Implemented Interfaces:
- LayoutManager, LayoutManager2, Serializable
public class TableLayout
extends GridBagLayout
This layoutmanager uses all of the GridBagLayout's managers functionality
and power but allows you to set the options easily. It will construct
the GridBagConstraints object for you.
To use it, set the layout manager for your Container to TableLayout and
add each component with a name string for which the format is specified
below:
"gridx gridy gridwidth gridheight ( ipadx ipady ) [ top left bottom right ] { weightx weighty} options"
you may use spaces or commas as separators.
gridx and gridy are mandatory, can be * for RELATIVE
gridwidth and gridheight are optional, can be * for REMAINDER
ipadx and ipady are optional
insets (top...right) are optional
weights are optional and override any settings made to them by the options
options are optional
Options may contain a set of characters which will set the corresponding
flag to true. If not set, the flag is false.
"r" right align
"l" left align
"t" top align
"b" bottom align
if none of these are set the component is placed in the center.
"w" resize both cell and component in width
"W" resize only cell in width
"h" resize both cell and component in height
"H" resize only cell in height
if none of these are set neither the component nor the cell is not resized.
and the extra space is put on the outside of the table.
The weight is calculated as follows, if not set explicitly by the {weight} section:
1 if character set, fill is set if lowercase.
You may construct a TableLayout with some default name string.
- Version:
- $Id: TableLayout.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Mark Donszelmann
- See Also:
- Serialized Form