Java Gui Builder
You are here: Home   >   Documentation   >   JGB Elements Documentation   >   Layout Element
JGB Element Navigation
tab
ref

Layout Element

Group membership: Layout control

Sets a new layout manager on the current container. Constraints may then be specified using constraints elements.

Attributes

Name Type Required Description
class CDATA Yes

The fully qualified class name of the layout class to use. This class must implement the LayoutManager interface.

If the class is part of the java.awt package, you may omit the package declaration. JGB will search in this package by default if it cannot find the exact name in this attribute's value.

Like the other class attributes of JGB, the class must be resolvable from the current ClassLoader in which the window creating is done.

id ID No

Identifies the name by which this control will be referenced by other parts of the JGB XML file or Java code.

Example usage

…
<!-- Set a new layout manager -->
<layout class="java.awt.GridBagConstraints"/>

<!-- And now, constrain it -->
<constraints>
    <gridbag anchor="CENTER" …/>
</constraints>
…
        

Parent element(s)

controls, control, tab.

Child element(s)

methodCall, property.
Back to top
SourceForge Logo
Hosted on SourceForge.net
Valid XHTML 1.0!
Valid XHTML 1.0 !
Valid CSS!
Valid CSS !
Code Coverage by Clover
Code Coverage provided by Clover
 |  Home |  License |  Downloads |  Documentation |  Developers |  Mailing Lists |  Dependencies |  Links |  Privacy Policy |  SF Project Home |