Richards_Branch #4

Merged
PBS2H21ASH merged 7 commits from Richards_Branch into main 2023-01-23 08:59:53 +01:00
3 changed files with 31 additions and 9 deletions
Showing only changes of commit 400ffb0e98 - Show all commits

View File

@ -2,6 +2,7 @@ package com.bib.essensbestellungsverwaltung;
import javafx.application.Application; import javafx.application.Application;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.stage.Stage; import javafx.stage.Stage;
@ -9,17 +10,17 @@ import java.io.IOException;
public class HelloApplication extends Application { public class HelloApplication extends Application {
@Override @Override
public void start(Stage stage) throws IOException { public void start(Stage primaryStage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml")); Parent fxmlStartSeiteLoader = FXMLLoader.load(HelloApplication.class.getResource("menue-view.fxml"));
/** /**
* @autor: Reshad Meher * @author: Reshad Meher
* Fenstergrößer * Fenstergrößer
* Fenstertitle * Fenstertitle
*/ */
Scene scene = new Scene(fxmlLoader.load(), 480, 280); primaryStage.setTitle("Essen Bestellung im Kindergarten");
stage.setTitle("Essen Bestellung im Kindergarten"); primaryStage.setScene(new Scene(fxmlStartSeiteLoader,950,480));
stage.setScene(scene); primaryStage.show();
stage.show();
} }
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -1,4 +1,25 @@
/**
* Author: Reshad Meher
* Startseite
* fxml: menue-view.fxml
*/
package com.bib.essensbestellungsverwaltung; package com.bib.essensbestellungsverwaltung;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.stage.Stage;
import java.io.IOException;
public class MenueController { public class MenueController {
@FXML
private void onBtLoginClick(){
Alert alert = new Alert(Alert.AlertType.ERROR, "Hi");
alert.showAndWait();
}
} }

View File

@ -14,7 +14,7 @@
<Font size="28.0" /> <Font size="28.0" />
</font> </font>
</Label> </Label>
<Button alignment="CENTER" layoutX="868.0" layoutY="61.0" mnemonicParsing="false" style="-fx-background-color: white;" text="Login" /> <Button alignment="CENTER" layoutX="845.0" layoutY="64.0" mnemonicParsing="false" style="-fx-background-color: white;" text="Login" onAction="#onBtLoginClick"/>
<VBox layoutX="14.0" layoutY="100.0" prefHeight="350.0" prefWidth="180.0" style="-fx-background-color: transparent; -fx-padding: 5;"> <VBox layoutX="14.0" layoutY="100.0" prefHeight="350.0" prefWidth="180.0" style="-fx-background-color: transparent; -fx-padding: 5;">
<children> <children>
<Label alignment="CENTER" contentDisplay="TOP" prefHeight="23.0" prefWidth="196.0" style="-fx-background-color: lightdarkblue;" text="Montag" textAlignment="CENTER"> <Label alignment="CENTER" contentDisplay="TOP" prefHeight="23.0" prefWidth="196.0" style="-fx-background-color: lightdarkblue;" text="Montag" textAlignment="CENTER">