#8: Setup Modal Window
All checks were successful
Quality Check / Linting Check (push) Successful in 12s
Quality Check / Javadoc Check (push) Successful in 20s

This commit is contained in:
Dominik Säume 2024-05-19 19:23:07 +02:00
parent 700aba10b7
commit 5106151b3b
Signed by: SZUT-Dominik
GPG key ID: DACB4B96EB59ABA8
4 changed files with 61 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.TabPane;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
import java.io.IOException;
@ -33,7 +34,23 @@ public class Main extends Application {
@Override
public void start(Stage primaryStage) {
this.primaryStage = primaryStage;
executeMainApplication();
executePassword();
//executeMainApplication();
}
private void executePassword() {
try {
FXMLLoader loader = new FXMLLoader(Main.class.getResource("/de/hitec/nhplus/login/LoginView.fxml"));
BorderPane pane = loader.load();
Scene scene = new Scene(pane);
this.primaryStage.setTitle("NHPlus");
this.primaryStage.setScene(scene);
this.primaryStage.setResizable(true);
this.primaryStage.show();
} catch (IOException exception) {
exception.printStackTrace();
}
}
/**

View file

@ -0,0 +1,8 @@
package de.hitec.nhplus.login;
public class LoginController {
public void initialize() {
}
}

View file

@ -10,6 +10,9 @@ module de.hitec.nhplus {
exports de.hitec.nhplus.main;
opens de.hitec.nhplus.main to javafx.base, javafx.fxml;
exports de.hitec.nhplus.login;
opens de.hitec.nhplus.login to javafx.base, javafx.fxml;
exports de.hitec.nhplus.patient;
exports de.hitec.nhplus.patient.database;
opens de.hitec.nhplus.patient.database to javafx.base, javafx.fxml;

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane
xmlns="http://javafx.com/javafx/17.0.2-ea"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="de.hitec.nhplus.login.LoginController"
minWidth="240"
maxWidth="240"
>
<padding>
<Insets bottom="8" left="8" right="8" top="8"/>
</padding>
<top>
<Label text="Anmeldung" BorderPane.alignment="CENTER" />
</top>
<center>
<VBox spacing="8">
<BorderPane.margin>
<Insets bottom="8.0" top="8.0"/>
</BorderPane.margin>
<TextField promptText="nutzername" VBox.vgrow="ALWAYS"/>
<PasswordField promptText="password" VBox.vgrow="ALWAYS"/>
</VBox>
</center>
<bottom>
<Button text="Bestätigen" BorderPane.alignment="CENTER" />
</bottom>
</BorderPane>