From 3d3021c1afd9a3beaa58448177ae591bb0ecb7fc Mon Sep 17 00:00:00 2001
From: a23022716 <celia.arezki.1@etu.univ-amu.fr>
Date: Fri, 11 Oct 2024 11:18:20 +0200
Subject: [PATCH] fix shapeApp class to Initialize the JavaFX application and
 create an instance of Drawer

---
 src/main/java/shape/tp5/ShapeApp.java | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/main/java/shape/tp5/ShapeApp.java b/src/main/java/shape/tp5/ShapeApp.java
index ab56f01..076f19b 100644
--- a/src/main/java/shape/tp5/ShapeApp.java
+++ b/src/main/java/shape/tp5/ShapeApp.java
@@ -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);
@@ -30,4 +19,4 @@ public class ShapeApp extends Application {
     public static void main(String[] args) {
         launch(args);
     }
-}
+}
\ No newline at end of file
-- 
GitLab