Java Reference
In-Depth Information
18
Swing II
18.1 WINDOW LISTENERS
1018
Example: A Window Listener Inner Class
18.4 COLORS
1058
Specifying a Drawing Color 1059
Defining Colors 1060
The
JColorChooser
Dialog Window 1062
1020
The
dispose
Method 1023
The
WindowAdapter
Class 1024
18.2 ICONS AND SCROLL BARS
1026
Icons 1026
Scroll Bars 1032
Example: Components with Changing Visibility 1037
18.5 FONTS AND THE
drawString
METHOD
1065
The
drawString
Method 1065
Fonts 1068
18.3 THE
Graphics
CLASS
1041
Coordinate System for Graphics Objects 1041
The Method
paint
and the Class
Graphics
1042
Drawing Ovals 1047
Drawing Arcs 1047
Rounded Rectangles
1051
paintComponent
for Panels 1052
Action Drawings and
repaint
1052
Some More Details on Updating a GUI
★
★
1058
Chapter Summary 1071
Answers to Self-Test Exercises 1071
Programming Projects 1075