Index

A

ABORT constant, 411

ABORTED constant, 61

abortGrabbing( ), 448

action( ), 96

Button component, 194

Checkbox component, 353

Choice component, 335

Component class, 181

List component, 345

MenuItem class, 368

TextField class, 315

ACTION_constants, 141

ACTION_EVENT event, 112

action keys, 137

ActionEvent class, 141, 831

ActionListener( ), 154

ActionListener interface, 147, 834

actionPerformed( ), 112, 147

activeCaption color, 89

activeCaptionBorder color, 89

activeCaptionText color, 89

adapter classes, 119

add( ), 47

add listener interfaces, 121, 155

Choice component, 333

Component class, 178

Container class, 209210

List component, 340

Menu class, 371

MenuBar class, 377

addActionListener( ), 196

List component, 348

MenuItem class, 368

TextField class, 317

addAdjustmentListener( )

Adjustable interface, 401

Scrollbar class, 393

addComponentListener( ), 185

addConsumer( )

FilteredImageSource class, 424

ImageProducer interface, 422

MemoryImageSource class, 427

addContainerListener( ), 214

addFocusListener( ), 186

addImage( ), 62

addImpl( )

Container class, 210

ScrollPane container, 403

addInternal( ), 156

addItemListener( )

Checkbox component, 355

Choice component, 336

List component, 347

Menu class, 375

addItem( )

Choice component, 333

List component, 340

addKeyListener( ), 186

addLayoutComponent( )

BorderLayout layout, 259, 261

CardLayout layout, 267268

FlowLayout layout, 256

GridBagLayout layout, 275

GridLayout layout, 264

HorizBagLayout layout, 295

LayoutManager interface, 251, 286

LayoutManager2 interface, 252

VerticalBagLayout layout, 296

addMouseListener( ), 186

addMouseMotionListener( ), 186

addNotify( )

Button component, 193

Canvas class, 200

Checkbox component, 352

CheckboxMenuItem class, 374

Choice component, 334

Container class, 174, 217

Dialog class, 237

FileDialog class, 244

Frame class, 230

Label component, 191

List component, 344

Menu class, 372

MenuBar class, 378

MenuItem class, 367

Panel class, 219

PopupMenu class, 384

Scrollbar class, 390

ScrollPane container, 405

TextArea class, 324

TextField class, 315

Window class, 225

addPoint( ), 51

addSeparator( ), 371

addTextListener( ), 310

addWindowListener( ), 226

Adjustable interface, 399401, 553

ADJUSTMENT_constants, 143

AdjustmentEvent( ), 144

AdjustmentEvent class, 143, 835

AdjustmentListener interface, 147, 838

adjustmentValueChanged( ), 109, 148

alignment

ALIGN parameter (<APPLET> tag), 996

BorderLayout vs. GridBagLayout, 271

centering text (example), 77

Component class constants, 162

of components, 169

container components, 213

of containers, 253

GridBagLayout layout for, 13, 271277, 694

GridLayout layout for, 11, 262266, 701

labels, 190

layout managers and (see under specific layout manager)

VariableGridLayout layout for, 297300

ALLBITS constant, 411

allowsMultipleMode( ), 342

alpha component, pixel, 415, 417, 420

Alt key (see modifiers) ALT parameter (<APPLET> tag), 996

anchor variable (GridBagContraints class), 278

animation, 5658

MemoryImageSource class for, 427429, 431433

append( ), 322

appendText( ), 322

Applet( ), 476

appletResize( ), 488

applets, 19, 475483

Applet class, 476483, 527

<APPLET> tag (HTML), 995–998

AppletContext interface, 485487, 531

AppletStub interface, 487488, 533

audio and, 481483

(see also audio)

arcHeight, arcWidth parameters, 29

ARCHIVES parameter

<APPLET> tag, 996

<PARAM> tag, 998

arcs, 32

AreaAveragingScaleFilter class, 37, 468, 901

ascent, font, 74

audio, 488493

applets and, 481483

AudioClip interface, 483485, 535

AudioData class, 488

AudioDataStream class, 490

AudioPlayer class, 491

AudioStream class, 489

AudioStreamSequence class, 491

beep( ), 503

ContinuousAudioDataStream class, 490

AWT

versions of, 2

AWT, versions of, xiii

AWTError error, 473474, 536

AWTEvent( ), 125

AWTEvent class, 118159, 537

constants of, 124

AWTEventMulticaster( ), 154

AWTEventMulticaster class, 153159, 541

AWTException exception, 471, 553

B

background colors, 89, 164

highlighted text, 91

images, 37

windows, 91

beep( ), 503

BITFTP, obtaining examples by, xix

BLOCK_constants, 143

blue (color), 8283, 415, 417418, 421

blurring filter (example), 456459

BOLD constant, 68

BorderLayout( ), 259

BorderLayout layout, 12, 257262, 557

borders

caption, color of, 8990

inset, 220

windows, color of, 91

BOTTOM_ALIGNMENT constant, 163

bounds( ), 167

brighter( ), 83

browsers, xx

getting information about, 487488

status line for, 479, 487

buffers (see memory)

buttons, 9

Button class, 9, 192197, 562

button events, 194197

button mask constants, 133

ButtonPeer interface, 951

ImageButton class, 9

keyboard events and, 195

mouse (see mouse events)

raised rectangles for, 30

ByteArrayImageSource class, 1015

bytesWidth( ), 78

C

CAB files, 998

CABBASE parameter name (<PARAM> tag), 998

calculator example, 197

Canvas( ), 200

Canvas class, 9, 199, 565

CanvasPeer interface, 952

captions, colors for, 8990

CardLayout( ), 267

CardLayout layout, 12, 266271, 566

carets, 307

cascading filters, 469

CENTER_ALIGNMENT constant, 163

centering (see alignment)

chains, listener (see AWTEventMulticaster class)

CHAR_UNDEFINED constant, 135

characters, 23

drawing, 23

echoing, 314

width of, 7678

(see also strings)

charsWidth( ), 78

charWidth( ), 76

checkAll( ), 64

Checkbox( ), 350

checkboxes

Checkbox component, 4, 349355, 571

checkbox events, 352355

checkbox menu events, 374375

CheckboxGroup class, 4, 356357, 576

CheckboxMenuItem class, 373375, 578

CheckboxMenuItemPeer interface, 952

state of, 351

CheckboxGroup( ), 356

CheckboxMenuItem( ), 373

checkID( ), 64

checkImage( )

ImageObserver interface, 173

Toolkit class, 500

Choice( ), 332

Choice component, 5, 331338, 580

ChoicePeer interface, 954

circles (see ovals)

classes, 50

adapter, 119

AWTEvent class, 118159

(see also under specific class name)

clear( ), 340

clearRect( ), 24

clickCount variable, 102

clicking mouse buttons (see mouse events)

Clipboard( ), 507

clipboards, xv, 19, 499, 510512

Clipboard class, 507508, 819

ClipboardOwner interface, 506, 821

StringSelection class, 508, 825

clipping area, 2426

clipRect( ), 24

clone( )

GridBagConstraints class, 282

ImageFilter class, 455

Insets class, 220

CODE parameter (<APPLET> tag), 997

CODEBASE parameter (<APPLET> tag), 997

Color( ), 82

ColorModel( ), 414

colors, 8094, 470

background, 89, 164

highlighted text, 91

images, 37

windows, 91

caption, 8990

Color class, 8187, 585

ColorModel class, 413421, 903

DirectColorModel class, 416, 908

foreground, 24, 164

IndexColorModel class, 418421, 926

menus and, 90

pop-up help and, 90

predefined, 81, 8791, 94

SystemColor class, 8792, 783

XOR mode and, 26

(see also images)

columns (see alignment)

columnWeights[ ] variable, 274

columnWidths[ ] variable, 274

comparing

colors, 87

dimensional sizes, 43

fonts, 72

insets, 220

menu shortcuts, 365

MIME types, 504

points, 42

rectangles, 50

COMPLETE constant, 61

COMPLETESCANLINES constant, 435

compList program, 10091012

Component( ), 163

COMPONENT_constants, 126127

ComponentAdapter interface, 148, 838

componentAdded( ), 149

ComponentEvent( ), 126

ComponentEvent class, 126, 840

componentHidden( ), 148

ComponentListener interface, 148, 842

componentMoved( ), 108, 148

componentRemoved( ), 149

componentResized( ), 148

components, 3, 162189, 207

CardLayout layout for, 12, 266271, 566

Component class, 162189, 592

ComponentPeer interface, 955

designing, 200204

handling events in, 187189

padding around, 281

peers for (see peers)

state of, 174177

(see also containers)

componentShown( ), 148

constants, 53

alignment, 162

AWTEvent class, 124

cursor shapes, 205

for each keyboard key, 134

Event class, 104113

for cursor shapes, 227

predefined colors, 81, 8791, 94

(see also under specific constant name)

consume( )

AWTEvent class, 125

InputEvent class, 134

Container( ), 208

CONTAINER_constants, 127

ContainerEvent( ), 127

containers, 1317, 50, 207218

Container class, 207218, 620

ContainerAdapter interface, 148, 843

ContainerEvent class, 127, 844

ContainerListener interface, 148, 847

ContainerPeer interface, 962

(see also components; under specific container)

contains( )

Container class, 169

Polygon class, 51

Rectangle class, 48

content types, 502505, 822

ContinuousAudioDataStream class, 490

control color, 89

Control key (see modifiers)

controlDkShadow color, 89

controlDown( ), 114

controlHighlight color, 89

controlLtHighlight color, 89

controlShadow color, 89

controlText color, 90

converting

colors formats (RGB/HSB), 86

images to pixels, 445453

coordinates, 19

coordinate system (see graphics)

of events, 103

GridBagLayout components, 279

mouse event, 140

(see also points)

copyArea( ), 26

CornerLayout layout (example), 287294

corners, rounded, 29

countComponents( ), 208

countItems( )

Choice component, 332

List component, 339

Menu class, 371

countMenus( ), 377

create( ), 22

createImage( )

Component class, 36, 172

createImage( )

Toolkit class, 502

cropping images, 38

CropImageFilter class, 465, 906

CTRL key (see modifiers)

Cursor( ), 205

cursors

components and, 165

Cursor class, 205, 630

Frame class constants for, 227

D

darker( ), 83

data, 501512

DataFlavor class, 502505, 822

Transferable interface, 505, 828

(see also clipboards)

DataFlavor( ), 503

date (see time and date)

debugging by overriding event handlers, 101

decode( )

Color class, 85

Font class, 72

de-emphasizing with color, 83, 89, 92

delegation model for event handling, 117159

deleteMenuShortcut( ), 367

deleteShortcut( ), 378

deleting, 179

applets, 480

Graphics objects, 22, 40

ImageConsumers (see removeConsumer( ))

layout components (see removeLayoutComponent( ))

listener interfaces, 156

(see also remove . . . Listener( ))

menu shortcuts, 367, 378

objects from MediaTracker, 62

peers (see removeNotify( ))

(see also remove( ); removeAll( ))

delItem( ), 341

delItems( ), 341

deliverEvent( ), 96

Component class, 180

Container class, 214

descent, font, 74

deselect( ), 342

DESELECTED constant, 145

desktop colors (see SystemColor class)

destroy( ), 480

Dialog( ), 235

dialogs, 16, 234241

Dialog class, 234238, 633

DialogPeer interface, 963

for files (see FileDialog class)

Dimension( ), 43

Dimension class, 42, 637

dimensions (see size)

DirectColorModel( ), 416

DirectColorModel class, 416, 908

disable( )

Container class, 177

MenuItem class, 367

disableEvents( )

Component class, 188

MenuItem class, 369

disabling LayoutManager, 284

dispatchEvent( ), 362

dispose( )

Frame class, 229

Graphics class, 40

Window class, 224

documentation (see help)

doLayout( )

Component class, 169

Container class, 213

ScrollPane container, 403

double buffering, 5860

draw3DRect( ), 30

drawArc( ), 32

drawBytes( ), 23

drawChars( ), 23

drawImage( ), 3639

drawing (see graphics)

drawLine( ), 28

drawOval( ), 31

drawPolygon( ), 33

drawPolyline( ), 34

drawRect( ), 29

drawRoundRect( ), 29

drawString( ), 23

DynamicFilter class (example), 459

E

echoCharIsSet( ), 314

echoing characters, 314

enable( )

Container class, 177

MenuItem class, 367

enableEvents( )

Component class, 187

MenuItem class, 369

end( ), 517

equality (see comparing)

equals( )

Color class, 87

of data flavors (MIME types), 505

Dimension class, 43

Font class, 72

Insets class, 220

MenuShortcut class, 365

Point class, 42

Rectangle class, 50

ERROR constant, 411

ERRORED constant, 61

errors, 63, 473474

FileDialog class and Navigator, 242

multimedia, 61

when loading images, 65

(see also exceptions)

Event( ), 113

EventQueue( ), 158

events, xiv, 18, 95159

checkbox, 352355

components and, 180189

containers and, 214

Event class, 101116, 639

event methods, 113115

event multicasters, 153159, 541

event queue, 117, 158, 499, 652

event triggers, 7

event types, 121

EventQueue class, 117, 158, 652

FileDialog class and, 112

focus (see focus events)

frames and, 230

handlers, 97, 100

handling at component level, 187189

Java 1.0 model of, 96101

Java 1.1 model of, 117159

keyboard (see keyboard events)

listeners (see listener interfaces)

lists and, 335338, 344349

menu, 362, 368370, 374375, 380382

mouse (see mouse events)

platforms and, 9991012

scrolling (see scrolling, scrolling events)

target of, 96, 103

TextArea class and, 325328

TextComponent class and, 309311

TextField class and, 315319

types of, 97

windows and, 225, 230

example programs, obtaining, xvii

exceptions, 63, 471473

MIME content type, 509

(see also errors; under specific exception)

F

family, font, 69

fetching images, 1016

FileDialog( ), 242

FileDialog class, 16, 241248, 653

events for, 112

FileDialogPeer interface, 964

FileImageSource class, 1015

fill variable (GridBagContraints class), 278

fill3DRect( ), 30

fillArc( ), 33

fillOval( ), 31

fillPolygon( ), 35

fillRect( ), 29

fillRoundRect( ), 29

FilteredImageSource( ), 424

FilteredImageSource class, 423, 911

filterIndexColorModel( ), 464

filtering images, 453470

cascading filters, 469

filterRGB( ), 464

filterRGBPixels( ), 464

finalize( )

ColorModel class, 416

Graphics class, 40

PrintJob class, 517

first( ), 269

flavors, data (see data)

flipping images, 38

FlowLayout( ), 254

FlowLayout layout, 11, 253257, 657

flush( ), 55

focus

components and, 177

focus events, 111, 184, 189

FocusEvent class, 128, 849

listeners for (see listener interfaces)

TextArea class and, 328

TextField class and, 316

(see also events)

FocusAdapter, FocusListener interfaces, 149, 848, 851

FOCUS_constants, 128

FocusEvent( ), 129

focusGained( ), 112, 149

focusLost( ), 112, 149

Font( ), 69

FontMetrics class, 665

fonts, 6773, 164

Font class, 6873, 661

font size, 68, 70

character width, 7678

font height, 7476

FontMetrics class, 7380

graphics and, 24

FontPeer class, 70

FontX class, 69

graphics and, 23

menus and, 361

style of, 68, 70

foreground

colors, 24

foreground colors, 164

Frame( ), 228

FRAMEBITS constant, 411

frames, 15, 227234

centering text in (example), 77

Frame class, 227232, 669

FramePeer interface, 965

menubars on, 375378

menus in (see menus)

(see also windows)

FTP, obtaining examples by, xvii

Ftpmail, obtaining examples by, xviii

G

gap settings

BorderLayout layout, 259

CardLayout layout, 267

FlowLayout layout, 256

GridLayout layout, 264

garbage collection, 40

getActionCommand( )

ActionEvent class, 142

Button component, 193

MenuItem class, 368

getAdjustable( ), 144

getAdjustmentType( ), 144

getAlignment( )

FlowLayout layout, 255

Label component, 191

getAlignmentX( )

Component class, 169

Container class, 213

getAlignmentY( )

Component class, 169

Container class, 213

getAlpha( )

ColorModel class, 415

DirectColorModel class, 417

IndexColorModel class, 420

getAlphaMask( ), 417

getAlphas( ), 421

getApplet( ), 485

getAppletContext( )

Applet class, 476

AppletStub interface, 488

getAppletInfo( ), 478

getApplets( ), 486

getAscent( ), 75

getAudioClip( )

Applet class, 482

AppletContext interface, 485

getBackground( ), 164

getBlockIncrement( )

Adjustable interface, 401

Scrollbar class, 390

getBlue( )

Color class, 83

ColorModel class, 415

DirectColorModel class, 417

IndexColorModel class, 421

getBlueMask( ), 418

getBlues( ), 421

getBoundingBox( ), 51

getBounds( )

Component class, 167

Polygon class, 51

Rectangle class, 46

Shape class, 44

getCaretPosition( ), 307

getCheckboxGroup( ), 351

getClickCount( ), 141

getClip( ), 26

getClipBounds( ), 26

getClipRect( ), 26

getCodeBase( )

Applet class, 477

AppletStub interface, 488

getColFraction( ), 299

getColor( )

Color class, 85

Graphics class, 24

getColorModel( ), 165

PixelGrabber class, 449

Toolkit class, 496

getColumns( )

GridLayout layout, 263

TextArea class, 323

TextField class, 313

getComponent( )

ComponentEvent class, 127

Container class, 208

ContainerEvent class, 128

getComponentAt( )

Component class, 169

Container class, 214

getComponentCount( ), 208

getComponents( ), 209

getConstraints( ), 276

getContainer( ), 128

getContents( ), 508

getCurrent( ), 356

getCursorType( ), 230

getCursor( ), 165

getData( ), 490

getDefaultCursor( ), 206

getDefaultToolkit( ), 496

getDescent( ), 75

getDirectory( ), 243

getDocumentBase( )

Applet class, 477

AppletStub interface, 487

getEchoChar( ), 314

getDecent( ), 75

getDescent( ), 75

getErrorsAny( ), 65

getErrorsID( ), 65

getFamily( ), 69

getFilenameFilter( ), 244

getFile( ), 243

getFilterInstance( ), 455

getFocusOwner( ), 225

getFont( )

Component class, 164

Font class, 71

FontMetrics class, 79

Graphics class, 23

MenuComponent class, 361

MenuContainer interface, 364

getFontList( ), 497

getFontMetrics( ), 24, 165, 497

getForeground( ), 164

getGraphics( ), 165

Component class, 21

Image class, 55

PrintJob class, 516

getGreen( )

Color class, 83

ColorModel class, 415

DirectColorModel class, 417

IndexColorModel class, 420

getGreenMask( ), 418

getGreens( ), 421

getHAdjustable( ), 404

getHeight( ), 54

FontMetrics class, 7576

PixelGrabber class, 449

getHelpMenu( ), 378

getHgap( )

BorderLayout layout, 259

CardLayout layout, 267

FlowLayout layout, 256

GridLayout layout, 264

getHSBColor( ), 86

getHScrollbarHeight( ), 403

getHumanPresentableName( ), 504

getIconImage( ), 228

getID( ), 125

getImage( )

Applet class, 36, 480

Toolkit class, 36

getImage( )

AppletContext interface, 485

Toolkit class, 500

getInsets( ), 217

getItem( )

AWTEvent class, 145

Choice component, 332

List component, 340

Menu class, 371

getItemCount( )

Choice component, 332

List component, 339

Menu class, 371

getItems( ), 340

getItemSelectable( ), 145

getKey( ), 365

getKeyChar( ), 136

getKeyModifiersText( ), 138

getKeyText( ), 137

getLabel( ), 192

Checkbox component, 350

MenuItem class, 366

getLayout( ), 211

getLayoutAlignmentX( )

BorderLayout layout, 262

CardLayout layout, 268

GridBagLayout layout, 275

LayoutManager2 interface, 253

getLayoutAlignmentY( )

BorderLayout layout, 262

CardLayout layout, 269

GridBagLayout layout, 276

LayoutManager2 interface, 253

getLayoutDimensions( ), 276

getLayoutOrigin( ), 276

getLayoutWeights( ), 277

getLeading( ), 75

getLength( ), 490

getLineIncrement( ), 389

getLocale( ), 472

Applet class, 479

Component class, 165

Window class, 224

getLocation( )

Component class, 166

Point class, 42

Rectangle class, 46

getLocationOnScreen( ), 166, 472

getMapS ize( ), 421

getMaxAdvance( ), 78

getMaxAscent( ), 75

getMaxDescent( ), 75

getMaximum( )

Adjustable interface, 401

Scrollbar class, 389

getMaximumS ize( )

Component class, 168

Container class, 212

getMenu( ), 377

getMenuBar( ), 229

getMenuCount( ), 377

getMenuShortcut( ), 366

getMenuShortcutKeyMask( ), 497

getMimeType( ), 504

getMinimum( )

Adjustable interface, 400

Scrollbar class, 389

getMinimumS ize( )

Component class, 168

Container class, 212

List component, 343

TextArea class, 324

TextField class, 314

getMode( ), 244

getModifiers( )

ActionEvent class, 142

InputEvent class, 133

getName( )

Clipboard class, 507

Component class, 178

Font class, 69

MenuComponent class, 361

getNextEvent( ), 159

getOrientation( )

Adjustable interface, 400

Scrollbar class, 388

getPageDimension( ), 517

getPageIncrement( ), 390

getPageResolution( ), 517

getParameter( )

Applet class, 477

AppletStub interface, 488

getParameterInfo( ), 478

getParent( )

Component class, 178

MenuComponent class, 363

getPeer( )

Container class, 173

Font class, 70

MenuComponent class, 362

getPixels( ), 449

getPixelS ize( ), 415

getPoint( ), 140

getPredefinedCursor( ), 206

getPreferredS ize( )

Component class, 168

Container class, 212

List component, 343

TextArea class, 323

TextField class, 313

getPrintJob( )

PrintGraphics interface, 515

Toolkit class, 497

getProperty( )

Image class, 55

Toolkit class, 498

getRed( )

Color class, 83

ColorModel class, 415

DirectColorModel class, 417

IndexColorModel class, 420

getRedMask( ), 418

getReds( ), 421

getRepresentationClass( ), 504

getRGB( )

Color class, 83

ColorModel class, 415

DirectColorModel class, 417

IndexColorModel class, 421

SystemColor class, 92

getRGBdefault( ), 415

getRowFraction( ), 299

getRows( ), 264

List component, 343

TextArea class, 323

getScaledInstance( ), 5354

getScreenResolution( ), 499

getScreenS ize( ), 499

getScrollbarDisplayPolicy( ), 403

getScrollbarVisibility( ), 324

getScrollPosition( ), 405

getSelectedCheckbox( ), 356

getSelectedIndex( ), 334

List component, 341

getSelectedIndexes( ), 341

getSelectedItem( )

Choice component, 333

List component, 341

getSelectedItems( )

CheckboxMenuItem class, 374

List component, 341

getSelectedObjects( )

Checkbox component, 351

Choice component, 334

ItemSelectable interface, 357

List component, 342

getSelectedText( ), 307

getSelectionEnd( ), 306

getSelectionStart( ), 306

getShortcutMenuItem( ), 377

getS ize( )

Component class, 167

Dimension class, 43

Font class, 70

Rectangle class, 47

getSource( ), 54

getState( )

Checkbox component, 351

CheckboxMenuItem class, 373

getStateChange( ), 146

getStatus( ), 448

getStyle( ), 70

getSystemClipboard( ), 499

getSystemEventQueue( ), 499

getSystemEventQueueImpl( ), 499

getText( )

Label component, 190

TextComponent class, 306

getTitle( )

Dialog class, 235

Frame class, 228

getToolkit( )

Component class, 164

Window class, 224

getTransferDataFlavors( )

DataFlavor class, 506

StringSelection class, 508

getTransferData( )

StringSelection class, 509

Transferable interface, 506

getTransparentPixel( ), 421

getTreeLock( ), 178

getType( ), 206

getUnitIncrement( )

Adjustable interface, 401

Scrollbar class, 389

getUpdateRect( ), 132

getVAdjustable( ), 404

getValue( )

Adjustable interface, 400

AdjustmentEvent class, 144

Scrollbar class, 389

getVgap( )

BorderLayout layout, 259

CardLayout layout, 267

FlowLayout layout, 256

GridLayout layout, 264

getViewportS ize( ), 403

getVisibleAmount( )

Adjustable interface, 400

Scrollbar class, 388

getVisibleIndex( ), 343

getVisible( ), 388

getVScrollbarWidth( ), 404

getWarningString( ), 225

getWhen( ), 133

getWidth( )

Image class, 54

PixelGrabber class, 448

getWidths( ), 78

getWindow( ), 131

getX( ), 140

getY( ), 140

GOT_FOCUS event, 112, 316, 328

gotFocus( )

Component class, 185

TextArea class, 328

TextField class and, 317

grabPixels( ), 447

graphics, 41

animation (see animation)

Canvas class for, 9, 199, 565

components and, 170171

Container class and, 216

coordinate space, 39, 41

double buffering, 5860

Graphics class, 2140, 675

images (see images)

multimedia and, 6166

PaintEvent class, 131, 888

printing, 513515, 760

shapes and (see shapes)

XOR mode, 26

(see also points)

green (color), 8283, 415, 417418, 421

GridBagConstraints( ), 282

GridBagConstraints class, 689

GridBagLayout( ), 274

GridBagLayout layout, 13, 271277, 694

GridBagConstraints class, 277282

gridheight, gridwidth variables (GridBag-Constraints class), 280

GridLayout( ), 263

GridLayout layout, 11, 262266, 701

grow( ), 47

H

handleEvent( ), 96100

Component class, 180

hashCode( )

Color class, 87

Font class, 72

Point class, 42

Rectangle class, 50

height (see size)

HEIGHT parameter (<APPLET> tag), 997

help

help menus, 378

pop-up help colors, 90

resources for further reading, xx

hide( ), 176

highlighting with color, 83, 89, 9192

horizontal

alignment (see alignment)

character width, 7678

gaps (see gap settings)

HorizBagLayout, 294

scrollbars (see scrolling)

size (see size)

HSB colors, 81, 86

HSBtoRGB( ), 86

HSPACE parameter (<APPLET> tag), 997

I

IllegalComponentStateException exception, 472, 705

IMAGEABORTED constant, 435

imageComplete( ), 437

ImageFilter class, 455

PixelGrabber class, 447

IMAGEERROR constant, 435

images, 3539, 409413, 422453, 470

animation with, 5658

applets and, 480

AreaAveragingScaleFilter class, 468

components and, 171173

converting to pixels, 445453

cropping, 465

decoders for, 1015

double buffering, 5860

DynamicFilter class (example), 459

FilteredImageSource class, 423

Image class, 5260, 706, 1014

image filters, 453470

ImageButton class, 9

ImageConsumer interface, 434453, 913

ImageFetcher class, 1016

ImageFilter class, 454, 917

ImageObserver interface, 36, 410413, 922

ImageProducer interface, 422433, 924

ImageProducer object, 54

ImageRepresentation consumer, 1014

InputStreamImageSource class, 1015

loading (see loading images)

MemoryImageSource class, 425433, 931

modifying, 449

multimedia and, 6166

PixelGrabber class, 445453

PPMImageDecoder class (example), 438445

ReplicateScaleFilter class, 467, 943

RGBImageFilter class, 462465, 946

scrolling (example), 393399

size of, 54, 410, 436

sources, classes for, 1015

Toolkit class and, 499502

(see also colors; graphics)

imageUpdate( ), 171, 412413

inactiveCaption color, 90

inactiveCaptionBorder color, 90

inactiveCaptionText color, 90

incrementaldraw parameter, 172

IndexColorModel class, 418421, 926

info color, 90

infoText color, 90

inheritance, 521

init( )

Applet class, 479

MediaTracker class, 65

input, 37

Checkbox component, 349355, 571

CheckboxGroup class, 356357, 576

Choice component, 331338, 580

dialogs (see dialogs; FileDialog class)

InputEvent class, 132134, 852

keyboard, 4

List component, 338349

menus for (see menus)

multiline text (see text, TextArea class)

single-line text (see text, TextField class)

text (see text)

insert( )

Choice component, 333

Menu class, 371

TextArea class, 322

inserting text, 307

insertSeparator( ), 371

insets( ), 217

Insets class, 219221, 709

inside( )

Container class, 169

Polygon class, 51

Rectangle class, 48

interfaces, 50

listeners (see listener interfaces)

peer (see peers)

(see also under specific interface)

InterruptedException, waiting and, 63

intersection( ), 48

intersections with rectangles, 4849

intersects( ), 48

invalidateLayout( ), 253

BorderLayout layout, 262

CardLayout layout, 269

GridBagLayout layout, 276

invalidate( )

Component class, 175

Container class, 214

isActionKey( ), 137

isActive( )

Applet class, 479

AppletStub interface, 487

isAltDown( ), 133

isAncestorOf( ), 211

isBold( ), 70

isConsumed( )

AWTEvent class, 125

InputEvent class, 134

isConsumer( )

FilteredImageSource class, 424

ImageProducer interface, 423

MemoryImageSource class, 427

isControlDown( ), 133

isDataFlavorSupported( )

DataFlavor class, 506

StringSelection class, 509

isEditable( ), 308

isEmpty( ), 49

isEnabled( )

Component class, 176

MenuItem class, 367

isErrorAny( ), 65

isErrorID( ), 65

isFocusTraversable( ), 177

isIndexSelected( ), 342

isItalic( ), 70

isMetaDown( ), 133

isMimeTypeEqual( ), 504

isModal( ), 236

isMultipleMode( ), 342

isPlain( ), 70

isPopupTrigger( ), 141

isResizable( )

Dialog class, 236

Frame classM, 229

isSelected( ), 342

isShiftDown( ), 133

isShowing( ), 175

isTearOff( ), 372

isTemporary( ), 129

isValid( ), 175

isVisible( ), 175

ITALIC constant, 68

ITEM_constants, 145

ItemEvent class, 144, 855

ItemListener interface, 149, 858

ItemSelectable interface, 357, 711

itemStateChanged( ), 111112, 150

J

JAR files, 998

Java

resources for further reading, xx

versions of, xiii

Java 1.0

Event class constants, 104

event handling, 96101, 117159

mouse buttons in, 115

JavaBeans, xv

K

KEY_constants, 135

KEY_ events, 104, 106, 134

key text properties, 137

keyboard events, 100, 106, 189

buttons and, 195

Checkbox component and, 354

Choice component and, 335

constants for each key, 134

Event class constants for, 104

key variable, 103

KeyAdapter class, 859

KeyEvent class, 134139, 860

KeyListener interface, 878

KeyListener, KeyAdapter interfaces, 150

List component and, 346

listeners for (see listener interfaces)

modifiers for, 103, 105, 113, 132133, 137, 365

key modifier text properties, 138

TextArea class and, 326

TextField class and, 315316

(see also events; events)

keyboard input, 4

keyboard shortcuts, 364365, 377

keyDown( )

Button component, 195

Checkbox component, 354

Choice component and, 335

Component class, 182

Event class, 106

List component, 346

TextArea class, 326

TextField class, 315

keyEvent( ), 136

keyPressed( ), 106, 150

keyReleased( ), 106, 150

keyTyped( ), 150

keyUp( )

Button component, 195

Checkbox component, 354

Choice component and, 336

Component class, 182

Event class, 106

List component, 346

TextArea class, 327

TextField class, 316

L

Label( ), 190

labels

Label component, 3, 189192, 712

LabelPeer interface, 966

for menu items, 366

last( ), 269

lastPageFirst( ), 517

layout( )

Component class, 169

ScrollPane container, 403

layoutContainer( ), 252

BorderLayout layout, 260

CardLayout layout, 268

FlowLayout layout, 257

GridLayout layout, 266, 275

HorizBagLayout layout, 295

LayoutManager interface, 287

OrientableFlowLayout layout, 302

VariableGridLayout layout, 299

VerticalBagLayout layout, 297

layouts, 1013, 249253, 302

BorderLayout, 12, 257262, 557

CardLayout, 12, 266271, 566

combining, 282

containers and, 211214

CornerLayout (example), 287294

designing, 285294

disabling LayoutManager, 284

FlowLayout, 11, 253257, 657

GridBagConstraints class, 277282, 689

GridBagLayout, 13, 271277, 694

GridLayout, 11, 262266, 701

HorizBagLayout, 294

LayoutManager interface, 10, 250253, 715

LayoutManager2 interface, 252253, 717

OrientableFlowLayout, 300302

scrollbar, 403

from sun.awt package, 294302

VariableGridLayout, 297300

VerticalBagLayout, 296

leading, font, 74

LEFT_ALIGNMENT constant, 163

LightweightPeer interface, xv, 503, 967

line increment, scrollbars, 389

lines, 28

arcs, 32

connecting to form polygons, 34

width of, 28

list( )

Component class, 179

Container class, 218

List class, 6, 339

LIST_ events, 347

listener interfaces, 118, 147153

AWTEventMulticaster class, 153159, 541

for checkbox events, 355

components and, 185

containers and, 214

for list events, 336338, 347

for menu events, 374

for menu item events, 368

for scrolling events, 392

for text events, 310311, 315, 317319

TextField class and, 317

windows and, 226

lists

checkboxes (see checkboxes)

List component, 338349, 719

list events, 111, 335338, 344349

ListPeer interface, 967

pop-up, 331338

LiveConnect, 997

LOADING constant, 61

loading images, 6166, 10131016

ImageObserver constants for, 411

status of (see status, loading)

Locale class, 165

locate( )

Component class, 169

Container class, 214

location( )

Component class, 166

GridBagLayout layout, 277

loop( ), 484

LOST_FOCUS event, 112, 316, 328

lostFocus( )

Component class, 185

TextArea class, 328

TextField class and, 317

lostOwnership( )

ClipboardOwner interface, 506

StringSelection class, 509

M

mail servers, obtaining examples by, xviii

makeVisible( ), 343

Mandelbrot program (example), 431

maxAscent value, 74

maximumLayoutS ize( ), 253

BorderLayout layout, 261

CardLayout layout, 268

GridBagLayout layout, 275

MAYSCRIPT parameter (<APPLET> tag), 997

MediaTracker class, 6166

memory, 22

color and, 413

garbage collection, 40

image data size, 448

MemoryImageSource class, 425433, 931

(see also performance) Menu( ), 370

MenuBar( ), 376

MenuComponent( ), 361

MenuItem( ), 366

menus, 7, 359373, 378382

checkboxes (see checkboxes)

colors of, 90

help menus, 378

Menu class, 370373, 734

menu events, 362, 368370, 374375, 380382

MenuBar class, 375378, 738

MenuBarPeer interface, 970

MenuComponent class, 361363, 741

MenuComponentPeer interface, 972

MenuContainer interface, 363, 744

MenuItem class, 365370, 745

MenuItemPeer interface, 972

MenuPeer interface, 973

MenuShortcut class, 364365, 750

pop-up (see pop-up menus)

MenuShortcut( ), 364

menuText color, 90

Meta key (see modifiers)

metaDown( ), 114

methods, 50

renaming for Java 1.1, xv, 2

(see also under specific class or method name)

MIME content types, 502505, 822

minimumLayoutS ize( ), 251

BorderLayout layout, 260

CardLayout layout, 268

FlowLayout layout, 257

GridLayout layout, 265, 275

HorizBagLayout layout, 295

LayoutManager interface, 286

OrientableFlowLayout layout, 302

VerticalBagLayout layout, 297

minimumS ize( )

Component class, 168

Container class, 212

List component, 343

TextArea class, 324

TextField class, 314

modes, FileDialog class, 242

modifiers

action event, 142

getModifiers( ), 133, 142

keyboard, 103, 105, 113, 132133, 137

key modifier text properties, 138

mouse button, 105, 113, 133

modifiers, keyboard

for menu shortcuts, 365

monitor resolution, 499

monitor size, 499

MOUSE_constants, 139

mouse events, 100, 108, 189

buttom modifiers, 113

button modifiers, 105, 133

clickCount variable, 102

Component class and, 182184

in Java 1.0, 115

listeners for (see listener interfaces)

MouseAdapter class, 879

MouseAdapter interfaces, 150

MouseEvent class, 139141, 881

MouseListener interface, 884

MouseListener interfaces, 150

MouseMotionAdapter class, 886

MouseMotionAdapter interface, 151

MouseMotionListener class, 887

MouseMotionListener interface, 151

scrollbars and, 392

(see also events; events)

mouse for text selection, 306307

mouseClicked( ), 151

mouseDown( )

Component class, 183

Event class, 108

mouseDrag( )

Component class, 183

Event class, 109

mouseDragged( ), 109, 152

mouseEnter( )

Component class, 183

Event class, 109

mouseEntered( ), 109, 151

MouseEvent( ), 140

mouseExit( )

Component class, 183

Event class, 109

mouseExited( ), 109, 151

mouseMove( )

Component class, 184

Event class, 108

mouseMoved( ), 108, 152

mousePressed( ), 108, 151

mouseReleased( ), 108, 151

mouseUp( )

Component class, 184

Event class, 108

move( )

Component class, 166

Point class, 42

multiline input (see text, TextArea class)

multimedia, 6166

MediaTracker class, 6166, 729

multithreading (see threads)

N

names

clipboards, 507

of components, 178

of data flavors (MIME types), 504

of fonts, 69

menu components, 361

NAME parameter

<APPLET> tag, 997

<PARAM> tag, 998

Netscape Navigator, 2

FileDialog class and, 242

newPixels( ), 428

newsgroups, Java-related, xx

next( ), 269

nextFocus( ), 178

normalizeMimeType( ), 504

normalizeMimeTypeParameter( ), 505

O

OBJECT parameter (<APPLET> tag), 997

objects

image (see images)

positioning and sizing, 166170

obtaining source code, xvii

OffScreenImageSource class, 1015

OrientableFlowLayout layout, 300302

orientHorizontally( ), 302

orientVertically( ), 302

origin

coordinate space, 39

GridBagLayout layout, 276

ovals, 31

overriding

action( ) (see action( ))

handleEvent( ), 100

imageUpdate( ), 412

owner, clipboard, 506, 821

owner, contents, 507

P

pack( ), 223

padding around components, 281

paging increment, scrollbars, 390

paint( )

Canvas class, 200

Component class, 21, 170

Container class, 216

paint mode, 2628

PAINT, PAINT_constants, 131

paintAll( ), 170

paintComponents( ), 216

PaintEvent class, 131, 888

painting (see graphics)

Panel( ), 219

panels

CardLayout layout for, 12, 266271, 566

FlowLayout layout for, 11, 253257, 657

OrientableFlowLayout layout for, 300302

Panel class, 218, 752

PanelPeer interface, 974

<PARAM> tag (HTML), 477, 997

paramString( ), 131

ActionEvent class, 143

AdjustmentEvent class, 144

AWTEvent class, 126

Button component, 193

Checkbox component, 352

CheckboxMenuItem class, 374

Choice component, 334

Component class, 179

ComponentEvent class, 127

Container class, 217

ContainerEvent class, 128

Dialog class, 237

Event class, 114

FileDialog class, 245

FocusEvent class, 129

Frame class, 230

ItemEvent class, 146

KeyEvent class, 138

Label component, 191

List component, 344

Menu class, 372

MenuComponent class, 363

MenuItem class, 367

MenuShortcut class, 365

MouseEvent class, 141

PaintEvent class, 132

Scrollbar class, 391

ScrollPane container, 405

TextArea class, 324

TextComponent class, 309

TextEvent class, 146

TextField class, 315

WindowEvent class, 131

(see also toString( ))

peekEvent( ), 159

peers, 10, 503506, 951985

Container class and, 173

Font class and, 70

performance, 22

colors and, 414

deleting applets and, 480

Graphics objects and, 22

MediaTracker and, 62

(see also memory)

PixelGrabber class, 445453, 937

pixels (see images)

PLAIN constant, 68

platforms

colors and, 81, 414

event handling and, 116

events and, 9991012

font ascent and, 74

layouts and, 1013

modifier keys and, 107

peer architecture, 10

scrolling events and, 392

Toolkit class, 495503, 805

play( )

Applet class, 481

AudioClip interface, 483

points, 19, 42

adding to polygons, 51

contained in rectangles, 48

Point class, 4142, 753

(see also Dimension class; graphics; coordinates)

polygons, 33, 5052

Polygon class, 5052, 756

pop-up lists, 331338

pop-up menus

PopupMenu class, xiv, 759

pop-up menus, 7, 382384

PopupMenu class, 383384

PopupMenuPeer interface, 975

portability, 1

events and, 116

positioning objects, 166170

postEvent( ), 98, 159

Component class, 180

MenuComponent class, 362

MenuContainer interface, 364

Window class, 226

PPMImageDecoder class (example), 438445

predefined colors, 81, 8791, 94

preferredLayoutS ize( ), 251

BorderLayout layout, 260

CardLayout layout, 268

FlowLayout layout, 256

GridLayout layout, 264, 275

HorizBagLayout layout, 295

LayoutManager interface, 286

OrientableFlowLayout layout, 301

VerticalBagLayout layout, 297

preferredS ize( )

Component class, 168

Container class, 212

List component, 343

TextArea class, 323

TextField class, 313

prepareImage( )

Component class, 173

Toolkit class, 500

previous( ), 269

print( )

Component class, 171, 517

Container class, 217

printAll( )

Component class, 171, 517

printComponents( )

Component class, 517

Container class, 216

ScrollPane container, 405

printing, 19, 513519

PrintGraphics interface, 513515, 760

PrintJob class, 515517, 761

Toolkit class and, 497

priority, loading multimedia objects, 62

processActionEvent( ), 197

List component, 348

MenuItem class, 369

TextField class, 318

processAdjustmentEvent( )

Scrollbar class, 393

processComponentEvent( ), 188

processContainerEvent( ), 216

processEvent( )

button component, 197

Checkbox component, 355

Choice component, 336

Component class, 188

Container class, 215

List component, 348

Menu class, 375

MenuComponent class, 363

MenuItem class, 369

Scrollbar class, 393

TextComponent class, 311

TextField class, 318

Window class, 226

processFocusEvent( ), 188

processItemEvent( )

Checkbox component, 355

Choice component, 337

List component, 348

Menu class, 375

processKeyEvent( ), 189

processMouseEvent( ), 189

processMouseMotionEvent( ), 189

processTextEvent( ), 311

processWindowEvent( ), 226

properties

color, 8486

font, 7072

image, 55

printing, 498

pull-down lists (see pop-up lists; pop-up menus)

Q

queue

1event (see events, event queue)

listener (see AWTEventMulticaster class)

R

radio buttons, 5

raised rectangles, 30

RANDOMPIXELORDER constant, 435

read( )

AudioStream class, 489

AudioStreamSequence class, 491

ContinuousAudioDataStream class, 490

read-only text, 308

rectangles

bounding an object, 167

copying, 26

determining size of, 44

as drawing area, 24

drawing, 29

filling, 2930

intersections with, 4849

raised (with shadow effect), 30

Rectangle class, 4450, 763

for repainting, 132

with rounded corners, 29

size of, 4649

red (color), 8283, 415, 417418, 421

redrawrate parameter, 172

RELATIVE constant, 280

REMAINDER constant, 280

remove( )

AWTEventMulticaster class, 157

Choice component, 333

Component class, 179

Container class, 211

Frame class, 229

List component, 340

Menu class, 372

MenuBar class, 377

MenuContainer interface, 364

remove listener interfaces, 156

removeActionListener( )

Button class, 196

List component, 348

MenuItem class, 368

TextField class, 318

removeAdjustmentListener( )

Adjustable interface, 401

Scrollbar class, 393

removeAll( )

Choice component, 333

Container class, 211

List component, 340

Menu class, 372

removeComponentListener( ), 186

removeConsumer( )

FilteredImageSource class, 425

ImageProducer interface, 423

MemoryImageSource class, 427

removeContainerListener( ), 215

removeFocusListener( ), 186

removeImage( ), 62

removeInternal( ), 157

removeItemListener( )

Checkbox component, 355

Choice component, 336

List component, 347

Menu class, 375

removeKeyListener( ), 186

removeLayoutComponent( )

BorderLayout layout, 260

CardLayout layout, 267

FlowLayout layout, 256

GridLayout layout, 264, 275

HorizBagLayout layout, 295

LayoutManager interface, 251, 286

VerticalBagLayout layout, 296

removeMouseListener( ), 186

removeMouseMotionListener( ), 187

removeNotify( )

Container class, 174, 217

List component, 344

Menu class, 372

MenuBar class, 378

MenuComponent class, 362

TextComponent class, 309

removeTextListener( ), 311

removeWindowListener( ), 226

repaint( ), 170

replaceItem( ), 340

replaceRange( ), 322

replaceText( ), 322

ReplicateScaleFilter( ), 468

ReplicateScaleFilter class, 37, 467, 943

requestFocus( ), 177

requestTopDownLeftRightResend( )

FilteredImageSource class, 425

ImageProducer interface, 423

MemoryImageSource class, 427

resendTopDownLeftRight( ), 455

resetting images, 55

reshape( ), 167

resize( )

Applet class, 480

Component class, 167

resolution, monitor, 499

resources for further reading, xx

resources, system (see performance)

RGB colors, 81, 83, 92, 415, 417

RGBImageFilter class, 462465, 946

RGBtoGSB( ), 86

RIGHT_ALIGNMENT constant, 163

rounded corners, 29

rowHeights[ ] variable, 274

rows (see alignment)

rowWeights[ ] variable, 274

S

sample programs, obtaining, xvii

SCALE_ hints, 53

screen resolution, 499

screen size, 499

SCROLL_ events, 391393

Scrollbar( ), 387

SCROLLBARS_constants, 402

scrolling, 385407

Adjustable interface, 399401, 553

images (example), 393399

with multiline text input, 319

Scrollbar class, 8, 386393, 775

scrollbar color, 90

ScrollbarPeer interface, 975

scrolling events, 109, 391393, 405

ScrollPane class, 770

ScrollPane container, 401407

ScrollPanePeer interface, 977

ScrollPane container, xiv, 8, 17

select( )

Choice component, 334

List component, 342

TextComponent class, 307

selectAll( ), 307

SELECTED constant, 145

separator menu items, 371

setActionCommand( )

Button component, 193

MenuItem class, 368

setAlignment( )

FlowLayout layout, 255

Label component, 191

setAnimated( ), 427

setBackground( ), 164

setBlockIncrement( )

Adjustable interface, 401

Scrollbar class, 390

setBounds( )

Component class, 167

Rectangle class, 46

setCaretPosition( ), 307, 472

setCheckboxGroup( ), 351

setClip( ), 25

setColFraction( ), 299

setColor( ), 24

setColorModel( )

ImageConsumer interface, 436

ImageFilter class, 454

PixelGrabber class, 447

RGBImageFilter class, 463

setColumns( )

GridLayout layout, 264

TextArea class, 323

TextField class, 313

setConstraints( ), 276

setContents( ), 508

setCurrent( ), 357

setCursor( )

Component class, 166

Frame class, 229

setDimensions( )

CropImageFilter class, 466

ImageConsumer interface, 436

ImageFilter class, 454

PixelGrabber class, 446

ReplicateScaleFilter class, 468

setDirectory( ), 243

setEchoCharacter( ), 314

setEchoChar( ), 314

setEditable( ), 308

setEnabled( )

Container class, 177

MenuItem class, 367

setFilenameFilter( ), 244

setFile( ), 244

setFont( )

Component class, 164

Graphics class, 23

MenuComponent class, 361

setForeground( ), 164

setFullBufferUpdates( ), 428

setHelpMenu( ), 378

setHgap( )

BorderLayout layout, 259

CardLayout layout, 267

FlowLayout layout, 256

GridLayout layout, 264

setHints( )

AreaAveragingScaleFilter class, 469

ImageConsumer interface, 437

ImageFilter class, 454

PixelGrabber class, 447

setHumanPresentableName( ), 504

setIconImage( ), 229

setKeyCode( ), 137

setLabel( )

Button class, 192

Checkbox component, 351

MenuItem class, 366

setLayout( )

Container class, 212

ScrollPane container, 403

setLineIncrement( ), 390

setLocale( ), 165

setLocation( )

Point class, 42

Rectangle class, 46

setLocation( )

Component class, 166

setMaximum( )

Adjustable interface, 401

Scrollbar class, 389

setMenuBar( ), 229

setMinimum( )

Adjustable interface, 400

Scrollbar class, 389

setModal( ), 237

setMode( ), 244

setModifiers( ), 137

setMultipleMode( ), 342

setMultipleSelections( ), 342

setName( ), 178

setOrientation( )

Adjustable interface, 400

Scrollbar class, 388

setPageIncrement( ), 390

setPaintMode( ), 28

setPixels( )

AreaAveragingScaleFilter class, 469

CropImageFilter class, 466

ImageConsumer interface, 437

ImageFilter class, 455

PixelGrabber class, 447

ReplicateScaleFilter class, 468

RGBImageFilter class, 463

setProperties( )

CropImageFilter class, 465

ImageConsumer interface, 436

ImageFilter class, 454

PixelGrabber class, 447

ReplicateScaleFilter class, 468

setResizable( )

Dialog class, 236

Frame classM, 229

setRowFraction( ), 299

setRows( )

GridLayout layout, 264

TextArea class, 323

setScrollPosition( ), 404

setSelectedCheckbox( ), 357

setSelectionEnd( ), 307

setSelectionStart( ), 307

setShortcut( ), 366

setSize( )

Dimension class, 43

Rectangle class, 47

setS ize( )

Component class, 167

setState( )

Checkbox component, 351

CheckboxMenuItem class, 374

setStub( ), 476

setText( ), 190

TextComponent class, 306

setTitle( ), 228

Dialog class, 235

setUnitIncrement( ), 390

Adjustable interface, 401

setValue( )

Adjustable interface, 400

Scrollbar class, 389

setValues( ), 389

setVgap( )

BorderLayout layout, 259

CardLayout layout, 267

FlowLayout layout, 256

GridLayout layout, 264

setVisible( ), 176

setVisibleAmount( )

Adjustable interface, 400

Scrollbar class, 389

setXORMode( ), 27

shadow colors, 83, 89, 92

shapes, 2835

checkboxes, 351

of cursors, 205, 227

polygons, 33, 5052, 756

rectangles (see rectangles)

Shape interface, 44, 782

Shift key (see modifiers)

shiftDown( ), 114

shortcuts, menu, 364365, 377, 750

shortcuts( ), 377

show( )

CardLayout layout, 269

Component class, 176

Dialog class, 237

PopupMenu class, 383

Window class, 224

showDocument( ), 486

showing, component, 175176

showStatus( )

Applet class, 479

AppletContext interface, 487

SINGLEFRAME constant, 436

SINGLEFRAMEDONE constant, 435

single-line input (see text, TextField class)

SINGLEPASS constant, 436

size, 211

applets, 480, 488

audio data length, 490

color map, 421

components, 211214, 251

cropping images, 465

Dimension class for, 43

font, 68, 70

character width, 7678

font height, 7476

HEIGHT, WIDTH parameters (<APPLET> tag), 997

image, 54, 410, 436

image data, 448

line width, 28

monitor (screen), 499

objects, components for, 166170

pixel, 415

rectangle, 4649

scrollbars, 403

string length in pixels, 77

text input objects, 313314

(see also layouts)

SizedTextField class (example), 328330

SOMEBITS constant, 411

sources, image, 1015

startGrabbing( ), 448

startProduction( )

FilteredImageSource class, 425

ImageProducer interface, 423

MemoryImageSource class, 427

start( )

Applet class, 479

AudioPlayer class, 492

state

checkbox, 351

checkbox menu items, 373

component, 174177

STATICIMAGEDONE constant, 435

status

applet, 479, 487

browser status line, 479, 487

image grabbing, 448

loading, 6465, 411, 500

status( ), 448

statusAll( ), 65

statusID( ), 65

stop( )

Applet class, 480

AudioClip interface, 484

AudioPlayer class, 492

strings, 23

pixel length of, 77

StringSelection class, 508, 825

toString( ) (see toString( ))

(see also characters)

stringWidth( ), 77

style, font (see fonts)

substituteColorModel( ), 464

sun.awt package, layouts from, 294302

sync( ), 503

synchronization

containers and, 210

image grabbing and, 452

SystemColor class, 8792, 783

T

target, event, 96, 103 (see also events)

text, 23, 505

color of, 8990

inserting with carets, 307

read-only, 308

selecting with mouse, 306307

style of (see fonts) text strings, 23

TextArea class, 4, 319328, 790

TextAreaPeer interface, 978

TextComponent class, 305311, 796

TextComponentPeer interface, 981

TextEvent class, 146, 891

TextField class, 4, 311319, 328330, 800

TextFieldPeer interface, 983

TextListener interface, 152, 892

(see also data; fonts)

TEXT_constants, 146

textHighlight color, 91

textHighlightText color, 91

textInactiveText color, 91

textText color, 91

textValueChanged( ), 152

themes, color, 8792

threads, animation and, 57

throwing errors/exceptions (see errors; exceptions)

time and date

of events, 103, 133

pause between image repaints, 172

toBack( ), 224

toFront( ), 224

Toolkit( ), 496

Toolkit class, 495503, 805

TOP_ALIGNMENT constant, 163

TOPDOWNLEFTRIGHT constant, 436

toString( ), 131

AWTEvent class, 126

BorderLayout layout, 262

CardLayout layout, 269

CheckboxGroup class, 357

Color class, 87

Component class, 179

Dimension class, 44

Event method, 114

FlowLayout layout, 257

Font class, 73

FontMetrics class, 79

Graphics class, 40

GridBagLayout layout, 277

GridLayout layout, 266

HorizBagLayout layout, 295

Insets class, 220

MenuComponent class, 363

MenuShortcut class, 365

OrientableFlowLayout layout, 302

Point class, 42

Rectangle class, 50

SystemColor class, 92

VariableGridLayout layout, 300

VerticalBagLayout layout, 297

(see also paramString( ))

TRACK constant, 144

Transferable interface, 505, 828

transferFocus( ), 178

translate( )

Event method, 114

Graphics class, 39

Point class, 42

Rectangle class, 46, 52

translatePoint( ), 140

transparency, 37

U

UndefinedProperty constant, 53

underlining, 69

union( ), 48

UNIT_constants, 143

UnsupportedFlavorException exception, 509, 829

update( ), 57

Component class, 21, 170

UPDATE constant, 131

URLImageSource class, 1015

URLs, special, 486

user groups, Java, xxi

useShiftModifier( ), 365

UUCP, obtaining examples by, xix

V

validate( )

Component class, 175

Container class, 213

validateTree( ), 214

validity, component, 174

VALUE parameter (<PARAM> tag), 998

VariableGridLayout layout, 297300

versions

AWT, xiii, 2

Java, xiii

vertical

alignment (see alignment)

font height, 7476

gaps (see gap settings)

scrollbars (see scrolling)

size (see size)

VerticalBagLayout layout, 296

visibility

component, 174176

list items, 343

scrollbar, 324, 388, 400

VK_constants, 134

VSPACE parameter (<APPLET> tag), 997

W

waitForAll( ), 63

waitForID( ), 63

Web browsers (see browsers)

when variable, 103

width (see size)

WIDTH parameter (<APPLET> tag), 997

Window( ), 222

WINDOW_constants, 129

Window container, 14

windowActivated( ), 153

windowBorder color, 91

windowClosed( ), 153

windowClosing( ), 107, 153

windowDeactivated( ), 153

windowDeiconified( ), 107, 153

WindowEvent( ), 131

windowIconified( ), 107, 153

windowOpened( ), 153

windowOpening( ), 107

windows, 14, 221227, 232

BorderLayout layout for, 12, 257262, 557

colors for, 91

Window class, 222227, 815

window events, 107

WindowAdapter class, 893

WindowEvent class, 129131, 895

WindowListener interface, 152, 898

WindowPeer interface, 984

(see also frames)

X

XOR mode, 26

Get Java AWT Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.