List of usage examples for javafx.animation ScaleTransition play
public void play()
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 500, 200); stage.setScene(scene);/*from w w w.ja v a 2 s . c o m*/ Rectangle rect = new Rectangle(100, 40, 100, 100); rect.setArcHeight(50); rect.setArcWidth(50); rect.setFill(Color.VIOLET); ScaleTransition st = new ScaleTransition(Duration.millis(2000), rect); st.setByX(1.5f); st.setByY(1.5f); st.setAutoReverse(true); st.play(); root.getChildren().add(rect); stage.show(); }