Make a method return only when a transition is finished

218 Views Asked by At

I have a small question. I have a method which has some Transitions inside it, with multiple Transitions I can use setOnFinished() to wait for another transition to finish, but my method will return immediately after it has been called. How can I make my method wait for the last setOnFinished()?

greenBack.setOnFinished(e -> {
    //return the method
});

Thank you very much!

0

There are 0 best solutions below