Chapter 20. Handling User Events with Swing

In order to turn a working Java interface into a working Java program, you must make the interface receptive to user events.

You've dealt with events before, learning how to handle mouse clicks and other user input with the Abstract Windowing Toolkit. You used this knowledge to create Java 2–compatible applets.

Handling User Events with Swing

When you're done, you'll celebrate the event by completing a full Java application using the Swing set of classes.

The Main Event

Under the event-handling system you learned about last week, events were dealt with via a set of methods that are available to all components. Methods such as mouseDown(), ...

Get Sams Teach Yourself Java™ 2 Platform in 21 Days Professional Reference Edition 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.