Java Gui Builder
You are here: Home   >   Documentation   >   JGB Elements Documentation

JGB Elements Documentation Index

Elements by type


Elements that declare controls to be added to the window.

button, check, combo, control, glue, label, list, panel, radio, sheet, strut, tab, table, textfield.
Document root

The root element of all JGB XML description files.


Elements that describe event-handling.

Layout control

Elements that control and constrain control layout.

border, constraints, controls, gridbag, layout.
Menu & items

Elements that declare and layout menus.

item, menu, menuBar, popupmenu, separator.
Property & method calls

Elements which control object creation, property management and method calling.

constant, constructor, methodCall, null, object, parameter, property, ref, return, value.

Elements by name


border elements add borders to the container in which they are declared. The only possible border type at the moment is a titled border, using the default BorderFactory.createTitledBorder(String title).


Adds a standard push button the window.


Adds a checkbox control to the window.


Allows selection of a single value in a list of values without using too much screen real estate.


Puts a constant on the stack ready for consumption by a methodCall, property or return element. The constant's value will be put on the JGB stack, and not the constant's name.


constraints elements describe constraints used when adding components to a container. When constraints elements are encountered, JGB saves the constraints' value ( ref, constant, value, return or gridbag) until such a time it will add a component.


constructor elements describe the constructor that will be called to instantiate objects of the enclosing object element.


The mother of all controls. This element adds a new control to the parent container, using the currently defined constraints.


Marks the beginning of the declaration of the window contents.


glue elements are controls which can expand or contract depending on the amount of space available.


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.


Adds a new item to the enclosing menu.


Adds a label to the current container.


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


Declares that a JList control be added to the window.


Declares a new menu inside a menuBar element.


Declares a menu bar that will be added to the enclosing window.


methodCall allows arbitrary methods to be called on objects. The referenced object can be specified so the method call does not need to occur on the enclosing object.


Puts a null on the stack ready for consumption by a methodCall, property or return element.


object elements describe the act of instantiating objects. Any class of object may be instantiated through the object tag. Even the layout and control tags are just extensions of the object.


Declares a new panel in which other controls can be added.


Describes a parameter to a method call or a constructor. The parameter's class is derived from the child used.


Declares a new popup menu.


property elements are used to set bean properties. The property name will be used to find a corresponding method on the referenced object. The corresponding method name will be found by concatenating "set" and the value of the name attribute, with the first character of the name attribute's value uppercased.


Adds a radio button to the window.


References an existing object from the builder's context. It is possible to view ID attributes as meaning variable names. In this case, ref acts as the right-hand side of expressions. Instantiation would then be the left-hand side of expressions.


Registers an event handler for a specific event.


return acts just like ref, constant and value elements. It makes the return value of a methodCall element accessible to enclosing elements by putting the method's return value on the JGB stack.


Adds a separator bar to the parent menu or item.


Declares that a sheet control be added to the window.


Struts are fixed width or height (or both) controls which are invisible, but use a fixed amount of space. These can be used to separate groups of controls.


Declares that a tab should be added to the enclosing sheet.


Declares a control of type JTable to be added to the window.


Adds a text field or area to the window. The difference between a field and an area is that the area is multiline. Therefore it is more adapted to long runs of text.


Declares a value that will be passed to an enclosing property, methodCall or parameter element.


The window tag describes one window. Windows extends java.awt.Window. JGB only uses javax.swing.JDialog and javax.swing.JFrame. It would be a simple matter to add support for java.awt.Dialog and java.awt.Frame.

Back to top
SourceForge Logo
Hosted on
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 |