diff --git a/parentOrder.txt b/parentOrder.txt index e69de29..e4f97b1 100644 --- a/parentOrder.txt +++ b/parentOrder.txt @@ -0,0 +1,23 @@ +[Felix Düsterhaus;Detmolderstrasse 101,33102 Paderborn;1234567;Lisa;12345678A, Hauptgericht: Pommes +mit Kroketten und Gemüse +(g,2,3) Dessert: Vegane Waffel +mit Puderzucker +(g,b,k), Hauptgericht: Bratkartoffeln +mit veganer Bratensoße +(b,2,3) Dessert: Pudding +mit Schokostreuseln +(b,2)] +[Felix Düsterhaus;Detmolderstrasse 101,33102 Paderborn;1234567;Lisa;12345678A, Hauptgericht: Rote Linsen Curry +mit Süßkartoffeln +(g,b,2,3) Dessert: Vegane Pancakes +mit Ahornsirup +(g,b,3)] +[Felix Düsterhaus;Detmolderstrasse 101,33102 Paderborn;1234567;Lisa;12345678A, Hauptgericht: Rote Linsen Curry +mit Süßkartoffeln +(g,b,2,3) Dessert: Vegane Pancakes +mit Ahornsirup +(g,b,3), Hauptgericht: Bratkartoffeln +mit veganer Bratensoße +(b,2,3) Dessert: Pudding +mit Schokostreuseln +(b,2)] diff --git a/src/main/java/com/example/vpr_javafx/HelloController.java b/src/main/java/com/example/vpr_javafx/HelloController.java index 57fd2f6..ceecaa3 100644 --- a/src/main/java/com/example/vpr_javafx/HelloController.java +++ b/src/main/java/com/example/vpr_javafx/HelloController.java @@ -1,5 +1,6 @@ package com.example.vpr_javafx; +import javafx.application.Platform; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; @@ -297,7 +298,7 @@ public class HelloController { protected void ToRegistration(ActionEvent event) throws IOException { Parent root = FXMLLoader.load(getClass().getResource("Registration-view.fxml")); - Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); + Stage stage = new Stage(); Scene scene = new Scene(root); stage.setScene(scene); stage.show(); @@ -319,12 +320,6 @@ public class HelloController { { try (FileWriter writer = new FileWriter("user.txt", true)){ writer.write(tfName.getText() + ";" + tfStreet.getText() + " " + tfHouseNumber.getText() + "," + tfPostalCode.getText() + " " + tfCity.getText() + ";" + tfPhone.getText() + ";" + tfChild.getText() + ";" + pfPassword.getText() + System.lineSeparator()); - - Parent root = FXMLLoader.load(getClass().getResource("MenuOverview-view.fxml")); - Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow(); - Scene scene = new Scene(root); - stage.setScene(scene); - stage.show(); } catch (IOException e) { diff --git a/target/classes/com/example/vpr_javafx/HelloController.class b/target/classes/com/example/vpr_javafx/HelloController.class index a79d6a8..fe57f86 100644 Binary files a/target/classes/com/example/vpr_javafx/HelloController.class and b/target/classes/com/example/vpr_javafx/HelloController.class differ diff --git a/user.txt b/user.txt index bf73a00..b527309 100644 --- a/user.txt +++ b/user.txt @@ -1,2 +1,3 @@ -Felix Düsterhaus;Sabine Gubitz;Detmolderstrasse 101,33102 Paderborn;1234567;Lisa,Peter;12345678A -Kevin Pfannenstiel;Marlene Pfannenstiel;Fürstenallee 30, 33102 Paderborn;7654321;Anton;12345678B +Felix Düsterhaus;Detmolderstrasse 101,33102 Paderborn;1234567;Lisa;12345678A +Kevin Pfannenstiel;Fürstenallee 30, 33102 Paderborn;7654321;Anton;12345678B +Max Muster;Fürstenallee 5,33102 Paderborn;123456789;Klaus Muster;12345abc