« Reading 'tween the Lines - Simplified JavaFX Script Animation Syntax | Main | Game Over: Improving upon the Compiled JavaFX Tetris Program »

April 25, 2008


generic propicia

i like this part of the post:"In the Reading 'tween the Lines - Simplified JavaFX Script Animation Syntax post, I showed you how to start, stop, pause and resume an animation. In this post I'm going to show you how to read the state of the animation (i.e. whether is it running, and whether it is paused). " is very good

Jim T

I have tried this example (metronome 1) in your Pro Java 1.2 book (using javafx 1.2.1)
tested on both mac and windows, as standard, web start and browser contexts.

The Play and Pause buttons do not update their their visual state properly. For example if you click start then stop, the start button remains grayed out. However, it is enabled and can be clicked to start again.

Oddly, the Resume and Stop buttons behave properly.

Can you explain this behavior?

James Weaver


The paused and running attributes have been recently added to the Timeline class, so the plug-in that you're using must not have the most recent JavaFX runtime classes. I would try updating the plug-in.



I just get an exception when I try to start this sample from Netbeans 6.1. The symbols running and paused are unknown. But it works when I compile it with the JavaFX compiler and launch it from the commandline.

The comments to this entry are closed.