O'Reilly logo

Sams Teach Yourself Java™ 2 Platform in 21 Days Professional Reference Edition by Rogers Cadenhead, Laura Lemay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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(), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required