Specifications
Sun Services
Java™ Programming Language
xii
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
The BorderLayout Manager ............................................................................................................. 10-24
Organization of the Border Layout Components ........................................................................... 10-25
The BorderExample Class ................................................................................................................. 10-26
Example of BorderLayout ................................................................................................................ 10-28
The GridLayout Manager ................................................................................................................. 10-29
The GridExample Class ..................................................................................................................... 10-30
Example of GridLayout .................................................................................................................... 10-32
The ComplexLayoutExample Class ................................................................................................. 10-33
Drawing in AWT ................................................................................................................................. 10-36
Various Shapes Drawn by the Graphics Object ............................................................................ 10-37
GUI Event Handling ................................................................................................ 11-1
Objectives ............................................................................................................................................... 11-2
Relevance ................................................................................................................................................ 11-3
What Is an Event? ................................................................................................................................. 11-4
Delegation Model .................................................................................................................................. 11-5
A Listener Example ............................................................................................................................... 11-7
Event Categories ................................................................................................................................... 11-9
Method Categories and Interfaces .................................................................................................... 11-10
Complex Example ............................................................................................................................... 11-13
Multiple Listeners ............................................................................................................................... 11-17
Event Adapters .................................................................................................................................... 11-18
Event Handling Using Inner Classes ............................................................................................... 11-19
Event Handling Using Anonymous Classes ................................................................................... 11-21
GUI-Based Applications ........................................................................................ 12-1
Objectives ............................................................................................................................................... 12-2
Relevance ................................................................................................................................................ 12-3
AWT Components ................................................................................................................................ 12-4
AWT Listeners ....................................................................................................................................... 12-7










