Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

javafx every second

Timeline timeline = new Timeline(new KeyFrame(Duration.seconds(1), ev -> {
    //what you want to do
}));
timeline.setCycleCount(1);//do it x times
timeline.setCycleCount(Animation.INDEFINITE);//or indefinitely

//play:
timeline.play();
//pause:
timeline.pause();
//stop:
timeline.stop();
 
PREVIOUS NEXT
Tagged: #javafx
ADD COMMENT
Topic
Name
7+9 =