Java Gui Builder |
|
You are here: | Home > Documentation > JGB Elements Documentation > Gridbag Element |
Group membership: Layout control
gridbag refers to GridBagConstraints objects. The act of using gridbag instantiates (or reuses) a GridBagConstraints object that will be used subsequently as a constraint when adding controls.
For extra information on this element's attributes, please consult the Java API reference for the GridBagConstraints class.
Name | Type | Required | Description |
---|---|---|---|
anchor | CDATA | No |
Defines the anchor position for controls added subsequently. The value of this attribute must be the name of one of the constants defined in the GridBagConstrainst class. |
fill | CDATA | No |
Defines the resizing policy for controls added subsequently. The value of this attribute must be the name of one of the constants defined in the GridBagConstrainst class. |
gridheight | CDATA | No |
Defines the height of controls in the virtual grid. |
gridwidth | CDATA | No |
Defines the width of controls in the virtual grid. |
gridx | CDATA | No |
Defines the X position in the virtual grid in which to add the control. |
gridy | CDATA | No |
Defines the Y position in the virtual grid in which to add the control. |
insets | CDATA | No |
Defines insets on subsequently added controls. Insets use the same ordering as CSS2 for border elements. See margin property definition for more information. |
ipadx | CDATA | No |
Defines padding in the X direction for subsequently added controls. |
ipady | CDATA | No |
Defines padding in the Y direction for subsequently added controls. |
weightx | CDATA | No |
Defines the horizontal weight of this control when resizing the window. |
weighty | CDATA | No |
Defines the vertical weight of this control when resizing the window. |
… <!-- Use a GridBagLayout class for this section of the window --> <layout class="GridBagLayout"/> <constraints> <!-- Set the constraints for the next control. We're going to add this new control at position 2 on the grid. --> <gridbag gridx="2"/> </constraints> <control …/> <constraints> <!-- Give more weight to this other control. --> <gridbag weighty="0.75"/> </constraints> <control …/> <constraints> <!-- Give the remainder of the space on the line to this control. --> <gridbag gridwidth="REMAINDER"/> </constraints> <control …/> …
Hosted on SourceForge.net |
Valid XHTML 1.0 ! |
Valid CSS ! |
Code Coverage provided by Clover |