Java Reference
In-Depth Information
public void pauseApp() {
}
public void destroyApp (boolean conditional) {
frame.dispose();
}
}
AWT contains lots of other active components and events. Introducing them all here would exceed the
scope of this topic.
Table 4.1
gives an overview of the AWT components. Please note that the
component events apply to all other (derived) components, although listed only once in the component
description.
Table 4.2
gives an overview of all events that are available in PDAP and the corresponding
listener interfaces that are needed for handling those events.
Tabl
e
4.1. AWT Compon
e
nts and Corresponding Events
Component Name
Events
Description
Button
ActionEvent
The Button class is a component that is used to
create a labeled button in order to invoke an
action if it is pushed.
Canvas
None
The
Canvas
is a component for custom drawing
by overriding the paint method.
Checkbox
ItemEvent
A
Checkbox
is a component that can be in either
selected (true) or deselected (false) state. An
ItemEvent
is fired, when the
CheckBox
is
(de)selected.
CheckboxMenuItem
ItemEvent
A
CheckboxMenuItem
represents one item of a
menu combining the functionality of a
MenuItem
and a
Checkbox
as well. It can be in either
selected (true) or deselected (false) state. An
ItemEvent
is fired, when the
CheckBox
is
(de)selected.
Choice
ItemEvent
The
Choice
class presents a component for
selecting one of a set of possible choices. An An
ItemEvent
is fired, when the
CheckBox
is
(de)selected.
Component
FocusEvent
The
Component
class is the abstract superclass
of all nonmenu-related AWT components.
Component
can be derived directly to implement
lightweight components.
KeyEvent
MouseEvent
Container
ContainerEvent
A
Container
is a specialized component that is
used to hold other components. A
ContainerEvent
is fired if a
Component
is
added or removed from a
Container
.
Label
None
A
Label
is a component for placing a single read-
only line of text in a container.
List
ItemEvent
A
List
represents a scrolling list of text items for
user selection. An
ItemEvent
is fired if the user
selects an item in the List.
MenuComponent
None
The class
MenuComponent
is the superclass of
all menu-related components.
MenuItem
ActionEvent
The class
MenuItem
represents one item of a
menu. An
ActionEvent
is fired if the
MenuItem
is selected.
Search WWH ::
Custom Search