Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rectangle rectangle = new Rectangle(100, 100);
- TranslateTransition translate = new TranslateTransition();
- translate.setNode(rectangle);
- translate.setToX(100);
- translate.setToY(100);
- translate.setDuration(Duration.seconds(2));
- translate.setCycleCount(Animation.INDEFINITE);
- translate.setAutoReverse(true);
- translate.play();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement