Help with javafx Create a javafx application that displays 1
Help with javafx: Create a javafx application that displays 1000 circles of random colors and at random locations each time the user clicks the pane. Make the scene 600w x 400h
Help with javafx: Create a javafx application that displays 1000 circles of random colors and at random locations each time the user clicks the pane. Make the scene 600w x 400h
Solution
import java.util.Random; import javafx.application.Application; import javafx.collections.ListChangeListener; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.stage.Stage; public class RandomColorTest extends Application { int radius = 20; int sceneWidth = 300; int sceneHeight = 300; @Override public void start(Stage primaryStage) throws Exception { Group root = new Group(); primaryStage.setResizable(false); primaryStage.setScene(new Scene(root, sceneWidth, sceneHeight)); final ObservableList