Java Gui Builder |
|
You are here: | Home > Documentation > JGB Elements Documentation > Panel Element |
Group membership: Controls
Declares a new panel in which other controls can be added.
This element also provides shortcuts when specifying one of the standard layout managers ( BorderLayout, FlowLayout or GridLayout).
Name | Type | Required | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
alignment | CDATA | No |
Will try to set the alignment property on the layout manager. If the layout manager does not have a proper method, a parsing exception will be thrown. Literal values
|
||||||||
columns | CDATA | No |
Will try to set the columns property on the layout manager. If the layout manager does not have a proper method, a parsing exception will be thrown. |
||||||||
hgap | CDATA | No |
Will try to set the hgap property on the layout manager. If the layout manager does not have a proper method, a parsing exception will be thrown. |
||||||||
id | ID | No |
Identifies the name by which this control will be referenced by other parts of the JGB XML file or Java code. |
||||||||
layout | CDATA | No |
A fully qualified class name that declares which class to instantiate and add as a layout manager. As a shortcut, it is possible to not prefix the full package information in the attribute's value. If the class cannot be found using the fully qualified class name, JGB will prefix java.awt. to the attribute value and try again. |
||||||||
reflabel | IDREF | No |
Identifies a control that prompts this one. |
||||||||
rows | CDATA | No |
Will try to set the rows property on the layout manager. If the layout manager does not have a proper method, a parsing exception will be thrown. |
||||||||
vgap | CDATA | No |
Will try to set the vgap property on the layout manager. If the layout manager does not have a proper method, a parsing exception will be thrown. |
… <!-- Use a java.awt.BorderLayout to layout this panel. The fully qualified class name is not specified here, so JGB will try with "java.awt." prefixed. --> <panel layout="BorderLayout"> <constraints> <constant name="java.awt.BorderLayout.CENTER"/> </constraints> … </panel> … <!-- Here, we specify the fully qualified class name so, JGB will search only once. --> <panel layout="javax.swing.SwingLayout"> … </panel> … <!-- Here, we are setting properties of the java.awt.GridLayout layout manager at the same time. --> <panel layout="GridLayout" columns="2" rows="4"> … </panel> …
Hosted on SourceForge.net |
Valid XHTML 1.0 ! |
Valid CSS ! |
Code Coverage provided by Clover |