Please help me to change gif file in javaFX ImageView and then switch to another scene after the gif is played once. When i do it like
i.setImage(url);
window.setScene(s);
the switch is done immediately. I don't see the gif shown on the screen. When i use
Thread.sleep(time),
between first two statements, the delay is realized, but gif does not change. How is it done correctly?