diff --git a/src/main/java/com/example/vpr_javafx/HelloApplication.java b/src/main/java/com/example/vpr_javafx/HelloApplication.java index 983780a..48e99d6 100644 --- a/src/main/java/com/example/vpr_javafx/HelloApplication.java +++ b/src/main/java/com/example/vpr_javafx/HelloApplication.java @@ -11,12 +11,13 @@ public class HelloApplication extends Application { @Override public void start(Stage stage) throws IOException { FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml")); - Scene scene = new Scene(fxmlLoader.load()); - stage.setTitle("Hello!"); + Scene scene = new Scene(fxmlLoader.load(),1000, 750); + stage.setTitle("Mittagsbestellung"); stage.setScene(scene); stage.show(); HelloController controller = fxmlLoader.getController(); controller.FillLabels(); + controller.writeAllergene(); } public static void main(String[] args) { diff --git a/src/main/java/com/example/vpr_javafx/HelloController.java b/src/main/java/com/example/vpr_javafx/HelloController.java index 104975b..4b6760f 100644 --- a/src/main/java/com/example/vpr_javafx/HelloController.java +++ b/src/main/java/com/example/vpr_javafx/HelloController.java @@ -59,6 +59,9 @@ public class HelloController { @FXML private PasswordField pfPassword; + @FXML + private Label allergene; + @FXML protected void OnSignInButton() { @@ -189,4 +192,27 @@ public class HelloController { } } + /** + * writeAllergene() is a method to format and set allergene + * @author Madeleine Vigier + */ + @FXML + protected void writeAllergene() { + allergene.setText("a: Eier; b: Soja,\n" + + "c: Milch; d: Erdnüsse;\n" + + "e: Weichtiere; f: Krebstiere;\n" + + "g: Getreide; h: Senf; i: Sesam;\n" + + "j: Schwefeldioxid und Sulfit;\n" + + "k: Nüsse; l: Sellerie;\n" + + "m: Fische; n: Lupinen\n\n" + + "1: Nitrit-Pökelsalz\n" + + "2:Phosphat\n" + + "3: Nitrat\n" + + "4: Antioxidationsmittel\n" + + "5: Farbstoff\n" + + "6: Geschmacksverstärker;\n" + + "7: Süßungsmittel;\n" + + "8: Konservierungsstoff"); + } + } \ No newline at end of file diff --git a/src/main/resources/com/example/vpr_javafx/hello-view.fxml b/src/main/resources/com/example/vpr_javafx/hello-view.fxml index 67963be..9b6e622 100644 --- a/src/main/resources/com/example/vpr_javafx/hello-view.fxml +++ b/src/main/resources/com/example/vpr_javafx/hello-view.fxml @@ -1,94 +1,207 @@ - - - - - + + + + + + + + + + + - -