Search code examples
javamultithreadingjavafxtransitionminimize

How to call a function only after a SequentialTransition in JavaFX has been completed?


I want to minimize my JavaFX window, only after a small SequentialTransition has taken place on the whole Stage. However, whenever write a statement after the transition statement, it takes place along with the transition. The window is minimized, using the method

setIconified()

But it minimizes before the transition takes place.


Solution

  • Register a callback with setOnFinish