Java Reference
In-Depth Information
Figure
7-1.
AWT's
nonmenu
component
class
hierarchy
is
rooted
in
java.awt.Component .
AWT'sabstract Component classistherootclassforallAWTnonmenucomponents
(and Swing components). Directly beneath Component are Button , Canvas ,
Checkbox , Choice , Container , Label , List , Scrollbar , and TextCom-
ponent :
Button describes a clickable label.
Canvas describes a blank rectangular area. You would subclass Canvas to
introduce your own AWT components.
Checkbox describes a true/false choice. You can use Checkbox with
java.awt.CheckboxGroup tocreateasetofmutuallyexclusiveradiobut-
tons.
Choice describes a drop-down list (also known as a pop-up menu) of strings.
Container describesacomponentthatstoresothercomponents.Thisnesting
capability lets you create GUIs of arbitrary complexity and is very powerful.
(Being able to represent containers as components is an example of the Com-
Search WWH ::




Custom Search