Let's say that I have an application window and I declare
Circle c = new Circle(40,40,40);, which is initially black. What should I do if I want to fill it with red?
What should I do if I want to fill it with red? (for example, if a button is clicked, then
c becomes red)
Set a fill on the shape (Java 8 code):
Circle circle = new Circle(40, 40, 40); Button button = new Button("Red"); button.setOnAction(e -> circle.setFill(javafx.scene.paint.Color.RED));