Issue 19 changes.

This commit is contained in:
David Wu
2017-08-17 12:50:41 +12:00
parent 8498701091
commit 6bc81f566e
7 changed files with 71 additions and 8 deletions
@@ -11,6 +11,8 @@ import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import visualiser.Controllers.MainController;
import java.io.IOException;
public class App extends Application {
private static Stage stage;
@@ -36,16 +38,22 @@ public class App extends Application {
System.exit(0);
}
});
FXMLLoader loader = new FXMLLoader(getClass().getResource("/visualiser/scenes/main.fxml"));
App.stage = stage;
loadStart(App.stage);
}
public static void loadStart(Stage stage) throws IOException {
FXMLLoader loader = new FXMLLoader(App.class.getResource("/visualiser/scenes/main.fxml"));
Parent root = loader.load();
stage.setResizable(false);
MainController mc = (MainController) loader.getController();
mc.enterTitle();
Scene scene = new Scene(root);
stage.setScene(scene);
stage.setTitle("RaceVision - Team 7");
stage.getIcons().add(new Image(getClass().getClassLoader().getResourceAsStream("images/SailIcon.png")));
stage.getIcons().add(new Image(App.class.getClassLoader().getResourceAsStream("images/SailIcon.png")));
mc.startCss();
setStage(stage);
stage.show();