JavaFX supports a lot of transition and animation classes for Node properties like the javafx.animation.ScaleTransition. But sometimes you need a special animation for that no default transition is provided by JavaFX. Currently the best pratice is to extend javafx.animation.Transition and override theĀ interpolate(double frac) method:

protected void interpolate(double frac) {

Because JavaFX offers PropertyBinding I created a BindableTransition which current fraction is a Property and can be bind to any other NumberProperty. Here is an example:

Button button = new Button("BindableTransition");
DropShadow shadow = DropShadowBuilder.create().build();

final Duration duration = Duration.millis(1200);
BindableTransition transition = new BindableTransition(duration);


The fractionProperty of the BindableTransition is bound to three different properties and the result will look like this:

{% include posts/vimeo.html id=“56550389” %}

The BindableTransition class and a demoare commited to the JFXtras project.

Hendrik Ebbers

Hendrik Ebbers is the founder of Open Elements. He is a Java champion, a member of JSR expert groups and a JavaOne rockstar. Hendrik is a member of the Eclipse JakartaEE working group (WG) and the Eclipse Adoptium WG. In addition, Hendrik Ebbers is a member of the Board of Directors of the Eclipse Foundation.

Circle Circle

Open Source made right


Privacy Policy Cookie Policy Privacy Config Impressum