The Custom Button and Menu

The Custom button and its associated choice menu are located above the component palette. This menu contains components that are not standard to AWT that you can add to your GUI. You can add your own custom components to this menu as well.

The following five components are included in the Custom menu:

Canvas

The Canvas component is a subclass (VJCanvas) of the AWT Canvas. You can draw objects in it programmatically. It will send you VJCanvas.PAINT_EVENT and VJCanvas.UPDATE_EVENT events when paint and update are called.

Special Attributes

minHeight
Minimum height (in pixels) of the canvas

minWidth
Minimum width (in pixels) of the canvas

Generic

The Generic component is a special component that you can use to import any custom AWT component class that you write. Its use is described in Adding Custom Components and Windows

Multi-line Label

Use the multi-line label to add text labels of more than one line to you GUI.

Scrolling Panel

The Scrolling Panel provides a panel with scrollbars for AWT components. If there is not enough space in the cells of the panel to display components you've added, scrollbars are automatically added.

Special Attributes

scrollAreaHeight
Height (in pixels) of the scroll area of the panel.
scrollAreaInsets
Space (in pixels) between the edge of the panel and its display area.
scrollAreaWidth
Width (in pixels) of the scroll area of the panel.

Text List

The Text List component is similar to the List component (in the component palette) in its behavior, except that it does not accommodate multiple selections. The major difference between the two components is the programmatic interface. The Text List component uses a vector to track its list elements, and you can access this vector directly. The Text List component can also be much faster and more convenient to use than the standard List interface, especially with really long lists.

Special Attributes

visibleRows
Sets the number or rows in the list.

Adding Custom Components to Your GUI

To add custom components to you GUI by following these steps:
  1. Choose one of the custom components on the choice menu next to the Custom button
  2. Click on the Custom button
  3. Click in a cell in the layout window in which you want the component located

Adding your Own Custom Component to the Custom Menu

You can add your own custom components to the Custom menu. See Adding Custom Components and Windows for details.


See also:

Visual Java Overview
The Visual Menu
Visual Java Components
Laying Out GUI Interfaces
Generating Java Source Code
Adding Operations (Filters and Actions)
Visual Java Runtime Classes
Creating Menus
Using Groups and Shadows (Basic)
Using Groups and Shadows (Advanced)
Visual Java API Documentation
Visual Java Runtime Packages
Class Hierarchy
Index of all Fields and Methods