Question: Modify the DrawStars example so that all the stars have Rotate transition animations that execute indefinitelythat is, set each animations cycle count to Animation.INDEFINITE. DrawStars

Modify the DrawStars example so that all the stars have Rotate transition animations that execute indefinitely—that is, set each animation’s cycle count to Animation.INDEFINITE.

DrawStars example

I // Fig. 22.7: DrawStarsController.java 2 // Create a circle of stars using Polygons and Rotate transforms 3

// Fig. 22.7: DrawStarsController.java 2 // Create a circle of stars using Polygons and Rotate transforms import java.security. SecureRandom; import javafx.fxml.FXML; 2345 5 import javafx.scene.layout. Pane; 6 import javafx.scene.paint.Color; 7 import javafx.scene.shape. Polygon; 8 import javafx.scene.transform. Transform; 9. 10 11 12 13 14 15 16 17 18 19 20 21 22222222 public class DrawStars Controller { 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 } @FXML private Pane pane; private static final SecureRandom random = new SecureRandom(); public void initialize() { // points that define a five-pointed star shape Double[] points (205.0,150.0, 217.0, 186.0, 259.0,186.0, 223.0,204.0, 233.0,246.0, 205.0,222.0, 177.0,246.0, 187.0,204.0, 151.0,186.0, 193.0,186.0}; // create 18 stars for (int count = 0; count

Step by Step Solution

3.44 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javafxanimationAnimation import javafxanimationRotateTransition import javafxutilDuration oth... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java How To Program Late Objects Questions!