37 lines
1.0 KiB
Java
37 lines
1.0 KiB
Java
package de.vanitasvitae.fasel.sample;
|
|
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Parent;
|
|
import javafx.scene.Scene;
|
|
import javafx.stage.Stage;
|
|
|
|
public class Main extends Application {
|
|
|
|
private Stage primaryStage;
|
|
|
|
@Override
|
|
public void start(Stage primaryStage) throws Exception{
|
|
this.primaryStage = primaryStage;
|
|
FXMLLoader loader = new FXMLLoader();
|
|
loader.setLocation(getClass().getResource("/fxml/layout/login.fxml"));
|
|
|
|
Parent root = loader.load();
|
|
loader.setLocation(getClass().getResource("/fxml/fragment/login.fxml"));
|
|
LoginController controller = loader.getController();
|
|
controller.setApplication(this);
|
|
Scene scene = new Scene(root, 1200, 741);
|
|
primaryStage.setTitle("Hello World");
|
|
primaryStage.setScene(scene);
|
|
primaryStage.show();
|
|
}
|
|
|
|
public Stage getPrimaryStage() {
|
|
return primaryStage;
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
launch(args);
|
|
}
|
|
}
|