Given the following code for a JavaFX program’s start method…
Given the following code for a JavaFX program’s start method, what is the best match for what the JavaFX Scene will look like? Assume the code compiles and all imports are included. public void start(Stage stage) throws Exception { Polygon triangle = new Polygon(-50, 50, 50, 50, 0, -50); triangle.setFill(Color.BLUE); triangle.setStroke(Color.BLACK); triangle.setStrokeWidth(5.0); Rectangle rect = new Rectangle(100,200, Color.ORANGE); rect.setStroke(Color.BLACK); rect.setStrokeWidth(5.0); Circle circle = new Circle(20, Color.BLACK); circle.setStroke(Color.ORANGE); circle.setStrokeWidth(5.0); FlowPane root = new FlowPane(circle, triangle, rect); Scene scene = new Scene(root, 400, 250); stage.setScene(scene); stage.show();}
Read Details