Java Awt Objects

Java Awt 1 objects are displayed on the Palette when you select Java as the current language. Palette Java objects are grouped in the following folders:

· Java AWT Primitives

Objects which cannot receive children: AwtButton, AwtLabel, AwtCheckbox, AwtChoice, AwtList, AwtScrollBar, AwtTextArea, 
AwtTextField, AwtCanvas, and AwtFileDialog.

· Java AWT Containers

Objects which can receive children: AwtFrame, AwtPanel, 
AwtApplet, and AwtScrollPane.

· Java AWT Menus

Objects used to build menus (menus can be contained within the Frame object only): AwtMenuBar, AwtMenu, AwtPopuMenu, AwtMenuItem, AwtCheckboxMenuItem, and AwtMenuSeparator.

Note: Only Java AWT objects are available on the Palette when you select Java as the current language.


Code generated objects

In some cases, non-visual objects are required to set resources. The following objects are not on the Palette, but are created when Builder Xcessory generates code:

· BorderLayout

· FlowLayout

· CardLayout

· GridLayout

· GridBagLayout

· GridBagConstraints

· CheckBoxGroup

These objects supply additional resources in the Resource Editor for the associated object.

The following sections provide descriptions of each Java object on the Palette, in alphabetical order. Refer to your Java AWT documentation for more detailed information.

Applet

Description

The AwtApplet object is a top level panel for applications designed to run within a Web browser (unlike a frame that pops up a separate window outside the Web browser)

Notes

· Subclassed from panel.

· Additional methods automatically called from browser.

· Can be run from a browser or Applet viewer.

· Default is FlowLayout.

Button

Description

The AwtButton class is a GUI button for which you can define an action that will happen when the button is pressed. Consists of a text label or pixmap surrounded by a border shadow.

Notes

When the button is selected, the object appears as if it has been pressed in.

Canvas

Description

The AwtCanvas class is general purpose component that allows you to paint or trap input events from the user.

Notes

· Can be used for creating graphics.

· Can be used as a base class that can be subclassed in order to create your own custom components.

Checkbox

Description

The AwtCheckbox class is a component that has an on/off state. Generates an event when state changes.

Notes

Maintains a Boolean state (whether checked or unchecked).

Checkbox Menu Item

Description

The AwtCheckboxMenuItem class is a checkbox with a text label in a GUI menu.

Notes

Maintains a Boolean state (whether checked or unchecked).

Choice

Description

The AwtChoice object is a menu of options that drops down from a button. The button displays an icon to indicate that a menu is available. Generates an event when a menu item is selected.

Notes

The button displays the currently selected option as its label.

Dialog

Description

The AwtDialog object is a top-level window used to create dialogs. Can be modal, that is, will allow only this window to receive input from the user.

Notes

· Dialog can have a title.

· Dialog can be resizable.

· Default layout is BorderLayout.


Note: The Make Class dialog is automatically displayed when you click on Dialog from the Palette.

File Dialog

Description

The AwtFileDialog object is a dialog that uses the native file chooser dialog to select a file from the file system

Notes

You can control which files are displayed in the dialog.


Note: The Make Class dialog is automatically displayed when you click on File Dialog from the Palette.

Frame

Description

The AwtFrame object is an optionally resizable top-level window that has a border and can also have an associated menu bar, title, cursor, or icon.

Notes

· Pops up a separate window outside the Web browser.

· When the Frame is no longer necessary, the dispose method must be called to allow the frame to release its window system resources for reuse.

· Default layout is BorderLayout.

Label

Description

The AwtLabel object is a component that displays a string at a certain location.

Notes

Constant values specify the text alignment within the component.

List

Description

The AwtList object scrolls strings. You can set the number of visible rows in the list and you can set whether the selection of more than one item is allowed.

Notes

· Strings can be added and removed from List.

· You can query the list.

· When the user double-clicks on an item, a List generates an event.

Menu

Description

The AwtMenu object contains a pulldown menu pane that appears when selected. Displays menu items.

Notes

Child of a menu bar.

Menu Bar

Description

The AwtMenuBar class is a menu bar that may be displayed within a Frame.

Notes

Can only be the child of a Frame.

Menu Separator

Description

The AwtMenuSeparator is used to separate new items in a pulldown menu.

Menu Item

Description

The AwtMenuItem is a menu item with a specific text label and can be added to a menu pane.

Panel

Description

The AwtPanel object is a container that can be used inside other containers. Allows you to make more intricate layouts by combining them with subpanels. It also can be subclassed to create custom containers.

Notes

· Does not create a separate window shell of its own.

· You can nest Panels to achieve a specific layout.

· Default layout is FlowLayout.

Popup Menu

Description

The AwtPopupMenu object displays popup menus and is used like AwtMenu.

Notes

Subclass of Menu.

Scrollbar

Description

The AwtScrollbar object is a scrollbar that can be used to build scrollable canvases.

Scroll Pane

Description

The AwtScrollPane container contains a single child component. Displays a fixed-size area of the child and provides horizontal and vertical scrollbars so the user can scroll the child component within the view of the Scroll Pane.

Notes

The child that Scroll Pane contains is usually larger than the Scroll Pane itself.

Text Area

Description

The AwtTextArea object is a simple text editing component.

Notes

Allows viewing and optional editing of multiline text.

Text Field

Description

The AwtTextField object is a single-line text component that can be used to build forms.


1. Abstract Window Toolkit (AWT) is a portable GUI library for stand-alone applications and/or applets. Refer to Java documentation for more detailed information.

 

Documentation: