Bestellungsverarbeitung

This commit is contained in:
2023-02-01 12:12:26 +01:00
parent aecf521d96
commit d3f08d30a5
4 changed files with 28 additions and 9 deletions

View File

@@ -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)
{