Skip to content
Snippets Groups Projects
Commit 3d3021c1 authored by AREZKI Celia's avatar AREZKI Celia
Browse files

fix shapeApp class to Initialize the JavaFX application and create an instance of Drawer

parent 68e8215b
No related branches found
No related tags found
No related merge requests found
......@@ -2,25 +2,14 @@ package shape.tp5;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class ShapeApp extends Application {
@Override
public void start(Stage primaryStage) {
Drawer drawer = new Drawer(400, 400);
Circle circle1 = new Circle(100, 100, 50);
Circle circle2 = new Circle(300, 300, 60);
Rectangle rectangle = new Rectangle(150, 150, 100, 80);
drawer.add(circle1);
drawer.add(circle2);
drawer.add(rectangle);
Pane root = new Pane();
root.getChildren().add(drawer);
StackPane root = new StackPane(drawer);
Scene scene = new Scene(root, 400, 400);
primaryStage.setTitle("Éditeur de formes");
primaryStage.setScene(scene);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment