|
- package de.uniluebeck.mi.projmi6;
-
- import de.uniluebeck.mi.projmi6.controller.MainController;
- import javafx.application.Application;
- import javafx.fxml.FXMLLoader;
- import javafx.scene.Parent;
- import javafx.scene.Scene;
- import javafx.scene.image.Image;
- import javafx.stage.Stage;
-
- public class Main extends Application {
-
- @Override
- public void start(Stage primaryStage) throws Exception {
- System.out.println(getClass().getClassLoader().getResource("").toExternalForm());
-
- FXMLLoader fxmlLoader = new FXMLLoader();
- fxmlLoader.setLocation(getClass().getClassLoader().getResource("main.fxml"));
-
- MainController mainController = new MainController();
- fxmlLoader.setControllerFactory(mainController.getControllerFactory());
-
- primaryStage.getIcons().add(new Image("icon.png"));
- Parent root = fxmlLoader.load();
-
- primaryStage.setTitle("KIS Gruppe 06");
- primaryStage.setScene(new Scene(root, 1000, 800));
- primaryStage.show();
- }
-
-
- public static void main(String[] args) {
- launch(args);
- }
- }
|