How many frames javafx renders depends on the complexity of your program. The cap is approx. 60 frames per second, which is the common border of fps for applications. The method is called before the frame is displayed (you can check this by simply setting a breakpoint in the method).
Actually, for AnimationTimer, frames per second are often used. This blog post explains a lot:
http://tbeernot.wordpress.com/2011/11/12/javafx-2-0-bubblemark/
AnimationTimer can be used for a wide range of applications, and not just for animations. If a good or bad idea to use for your specific application cannot be determined without looking at the code itself. but for using AnimationTimer this is a good source to read:
http://blog.netopyr.com/2012/06/14/using-the-javafx-animationtimer/
source share