Chapter 2

Looking Closer at JavaFX Programming

In This Chapter

arrow Importing the classes you need to create a JavaFX program

arrow Creating a class that extends the JavaFX Application class

arrow Using classes such as Button, BorderPane, and Scene to create a user interface

arrow Creating an event handler that will be called when the user clicks a button

arrow Examining an enhanced version of the Click Me program

In Chapter 1, I introduce you to a simple JavaFX program called the Click Me program and briefly describe how that program works. In this chapter, I put this program under the microscope and examine it in close detail. By the time you finish this chapter, you’ll understand how every line of the Click Me program works and why it’s required. Then, you’ll be ready to start figuring out more nuanced techniques of JavaFX programming.

Looking Again at the Click Me Program

Figure 2-1 shows the Click Me program in action. As you can see, this program displays a simple button that contains the words Click me ...

Get JavaFX For Dummies now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.