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 13. Responding to User Input in an Applet

With the skills you have developed so far, you can design a graphical user interface with beauty but no brains. It might look like a working interface—receiving button clicks and other interactions like any other program—but nothing happens in response to those interactions.

To make an interface functional in Java, you must learn how to make a program respond to events. Events are method calls that Java's windowing system performs whenever any element of a user interface is manipulated. A wide variety of events cover mouse and keyboard use, including mouse-click events, mouse-movement events, and keypress events.

Today you learn how to make an applet handle events by using the techniques of Java ...

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