O'Reilly logo

Introducing JavaFX 8 Programming by Herbert Schildt

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

image

CHAPTER

2

Introducing Events and Controls

The program shown at the end of the previous chapter presented a simple example that constructed a scene graph and introduced the Label control. However, it did not show one important feature found in most JavaFX programs: event handling. In JavaFX, an event is an object that describes some action that has affected the program, such as when the user interacts with the program by clicking a button. Because Label does not take input from the user, it does not generate events, so no event handling was needed to use it. However, other JavaFX controls do generate events in response to user input. For example, ...

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