The Form Editor (MkGUI)
The GUI Builder enables you to quickly create JFC GUIs by means of a generic layout scheme.
Please read the respective section below as the layout scheme, though simple, is not self-explaining.
XML files (we call them GUI Markup Language, GML) created by the GUI Builder are stored in
[workspace dir]\forms. Images are found in [workspace dir]\images.
The GUI Builder allows for
- Instantiating Components
- Laying them out
- Defining the resizing behaviour
- Setting properties
- Generating event handlers
Warning:
AnyJ supports Swing 1.1.1. The difference between the Swing 1.0x and 1.1.x releases is the new package
naming scheme. (Swing 1.1.x has the same package names as JDK 1.2.).
Although most new Beans support both old and new package names, some older beans will
fail to instantiate. Your application will not run if Swing 1.03 or lower is installed
(although the GUI Builder will work).
Opening the GUI Builder
If your project does not contain any forms, choose "MkGUI" from the MainWindows "Tools" Menu.
If you not have created a swing-type workspace, the GUI Builder will ask you to create some
infrastructure (subfolders).
If there are already forms inside your project, select a Form in the FileTree and choose "Open Form"
from the PopupMenu.
Note:
Depending on the VM and hardware you use, it may take ten to twenty seconds to start up the GUI Builder for
the first time (Swing gets jit-compiled, Beans are analysed).
Working with Container components (Tabs/Groups)
Container Components are Components, which can contain other Components. IN contradiction to
other GUI-Builders, common controls such as TextPane, TreeView or Listboxes are automaticlly wrapped
into a Scrollpane.
AnyJ offers special support for "TabbedPane" and "Group" Boxes. If a selected Container shows up
black pivots, it acts like a normal Non-Container Component (e.g. a Button).
By Double-Clicking, a Container-Component can be made "active".
This is reflected by the pivotelements getting colored red.
Your working area, which covered the complete form before,
is now restricted to the content of the active container.
E.g. if you create or paste a Button, it will be added to the active Container.
This also works within nested containers.
You can move Components from one Container to another by Drag & Drop.
Note: Older versions of AnyJ contain a bug. In this versions, Drag & Drop only works if the
dragged component is in front of the Z-order. You can put a component to front by selecting it and
choose "To Front" from the PopupMenu or press the "ToFront" Button (or the HOME respectively the POS_1 key).
To add or remove Tabs to a TabbedPane, use the Tabbed Pane Customizer.