Domanda

I am a beginner in javafx. I need to use small animations so much . Is there any way to create small animation except timeline ? Thank's

È stato utile?

Soluzione

Yes, the three options for animation in JavaFX are:

  1. Transition javadoc, tutorial (high-level)
  2. Timeline javadoc, tutorial (intermediate-level)
  3. AnimationTimer javadoc, tutorial (low-level)

In general when picking an animation API to use for your application, start at the highest level and see if there is a Transition type which fits your requirements. If not, consider subclassing Transition. If there is no matching Transition and subclassing Transition isn't really what you want to do, then use a Timeline for most other tasks. If all you want to do is intercept every rendering pulse of the application and take some action based on that, then you can use the AnimationTimer.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top