Introduction to JavaFX
Swing has been around for a long time and some very powerful applications and frameworks are written with this library. One of those powerful applications is the NetBeans IDE, and one of those powerful frameworks is the NetBeans Platform. Just because these applications and frameworks are based on Swing, however, doesn’t mean you can’t or shouldn’t use JavaFX. Indeed, we hope that the material in this book will help you incorporate JavaFX into your NetBeans Platform applications, and by doing so, create rich client applications that both perform well and are beautiful.
We begin with a nice, gentle introduction to JavaFX. But rest assured, we ramp up the material quickly in this chapter. Obviously, we can’t cover everything you need to know about JavaFX here, but like the previous chapter’s presentation of Swing, we want to give you enough so that you’ll be comfortable reading and using JavaFX code in desktop applications.
In this chapter, you’ll learn the basics of JavaFX, its structure, and the philosophy of how JavaFX constructs a GUI. You’ll learn about different coding styles and discover the styles that best suit you and your development team. In the next chapter, we’ll show you how JavaFX fits into the world of desktop application development. We’ll also lay the groundwork for using JavaFX with the NetBeans Platform.
What You Will Learn
- Understand JavaFX basics.
- Build JavaFX programs and use JavaFX APIs.
- Build a scene graph with shapes, controls, and layout.
- Use FXML and controller classes.
- Incorporate CSS files into your JavaFX designs.
- Apply JavaFX animation and event handling.
- Understand JavaFX properties, observables, InvalidationListeners, and ChangeListeners.
- Understand and apply JavaFX binding.