create a new Java class, Ant, that draws the path of an ant thatis walking randomly around a JavaFX window. This should look alittle like a scribbling on a page. If the ant walks off the edgeof the screen re-center the ant and continue the random walk. Usethe basic template from the code from lecture X01.
In addition to that, you may find the following helpful: …
primaryStage.setScene(scene);
Timeline timeline = new Timeline(newKeyFrame(Duration.millis(100), ae -> { /* your code goes here */}));
timeline.setCycleCount(Animation.INDEFINITE);
timeline.play(); primaryStage.show(); …
Expert Answer
An answer will be send to you shortly. . . . .