created new window

This commit is contained in:
Marco Kühn 2021-11-25 11:34:33 +01:00
parent 95de4b5985
commit 1900f83b45
4 changed files with 40 additions and 0 deletions

View File

@ -2,6 +2,10 @@ GridPane{
-fx-background-color: #282C34; -fx-background-color: #282C34;
} }
Label{
-fx-text-fill: white;
}
.main-btn{ .main-btn{
-fx-background-color: #ffffff; -fx-background-color: #ffffff;
-fx-text-fill: white; -fx-text-fill: white;

View File

@ -1,13 +1,20 @@
package client; package client;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.layout.GridPane; import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox; import javafx.scene.layout.VBox;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import javafx.stage.Modality;
import javafx.stage.Stage;
import res.Event; import res.Event;
import res.DataController; import res.DataController;
import java.io.IOException;
import java.util.Objects;
public class MainController { public class MainController {
@FXML @FXML
private GridPane calendarGrid; private GridPane calendarGrid;
@ -30,6 +37,21 @@ public class MainController {
@FXML @FXML
protected void onAddBtnClick(){ protected void onAddBtnClick(){
try{
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("create-event.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 600, 400);
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("create-event.css")).toExternalForm());
Stage stage = new Stage();
stage.setTitle("Termin erstellen");
stage.setScene(scene);
stage.initModality(Modality.APPLICATION_MODAL);
stage.showAndWait();
}
catch (IOException e){
e.printStackTrace();
}
DataController dataController = new DataController(); DataController dataController = new DataController();
Event[] eventList = dataController.getAllEvents(); Event[] eventList = dataController.getAllEvents();

View File

@ -0,0 +1,3 @@
GridPane{
-fx-background-color: #3E415F;
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<GridPane>
<Label>Terminerstellen</Label>
</GridPane>