From 96eee8ab223b93a6a37cc3aad1605373349029e1 Mon Sep 17 00:00:00 2001
From: Theodora-Mara Pislar <tmp1u19@soton.ac.uk>
Date: Mon, 24 Feb 2020 23:17:48 +0000
Subject: [PATCH] Build a GUI without functionality, only the buttons are
 displayed and the space fort the graphics is created.

---
 Mathdoku.java | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 Mathdoku.java

diff --git a/Mathdoku.java b/Mathdoku.java
new file mode 100644
index 0000000..430ddd5
--- /dev/null
+++ b/Mathdoku.java
@@ -0,0 +1,54 @@
+import javafx.application.Application;
+import javafx.geometry.Insets;
+import javafx.geometry.Pos;
+import javafx.scene.Scene;
+import javafx.scene.canvas.Canvas;
+import javafx.scene.canvas.GraphicsContext;
+import javafx.scene.control.Button;
+import javafx.scene.layout.HBox;
+import javafx.scene.layout.VBox;
+import javafx.stage.Stage;
+
+public class Mathdoku extends Application {
+
+    public static void main(String[] args) {
+        launch(args);
+    }
+
+    @Override
+    public void start(Stage primaryStage) {
+
+        VBox menu = new VBox();
+        menu.setPadding(new Insets(10));
+        menu.setAlignment(Pos.CENTER);
+
+        HBox topButton = new HBox();
+        HBox bottomButton = new HBox();
+        topButton.setPadding(new Insets(10));
+        bottomButton.setPadding(new Insets(10));
+        bottomButton.setAlignment(Pos.CENTER);
+
+        Button undo = new Button("Undo");
+        Button redo = new Button("Redo");
+        Button help = new Button("Help");
+        Button clear = new Button("Clear");
+        Button fileLoad = new Button("Load from file");
+        Button textLoad = new Button("Load from text");
+        Button submit = new Button("Submit");
+
+        topButton.getChildren().addAll(undo, redo, help);
+        bottomButton.getChildren().addAll(clear, fileLoad, textLoad, submit);
+
+        Canvas c = new Canvas();
+        GraphicsContext gc = c.getGraphicsContext2D();
+
+        c.setHeight(400);
+        c.setWidth(400);
+
+        menu.getChildren().addAll(topButton, c, bottomButton);
+
+        Scene scene = new Scene(menu);
+        primaryStage.setScene(scene);
+        primaryStage.show();
+    }
+}
-- 
GitLab