22.7 Transition Animations

Animations in JavaFX apps transition a Node’s property values from one value to another in a specified amount of time. Most properties of a Node can be animated. This section focuses on several of JavaFX’s predefined Transition animations from the javafx.animations package. By default, the subclasses that define Transition animations change the values of specific Node properties. For example, a FadeTransition changes the value of a Node’s opacity property (which specifies whether the Node is opaque or transparent) over time, whereas a PathTransition changes a Node’s location by moving it along a Path over time. Though we show sample screen captures for all the animation examples, the best way to experience each is ...

Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.