In this chapter, we will cover the following topics:
Building a JavaFX application
Drawing simple shapes
Creating complex shapes using Path
Creating shapes with constructive area geometry
Drawing letter shapes using the Text class
Handling user input
Arranging your nodes on stage
Making your scripts modular
Creating your own custom node
Controlling your application's window style
Going full-screen
JavaFX Script was designed with the sole intent of being a language to create graphically-rich user interfaces. Instead of the traditional imperative and dense boilerplate code (as found in Java and other general purpose languages), JavaFX adopted an intuitive and declarative scripting-style that lets developers quickly create complex graphical components with simplified constructs.
JavaFX benefited from years of experience that engineers at Sun Microsystems (now Oracle) gained creating desktop platforms such as Swing. Therefore, the JavaFX framework...