diff --git a/src/seedu/addressbook/ui/Gui.java b/src/seedu/addressbook/ui/Gui.java index 20a7833c1..ed21989a4 100644 --- a/src/seedu/addressbook/ui/Gui.java +++ b/src/seedu/addressbook/ui/Gui.java @@ -36,7 +36,12 @@ public void start(Stage stage, Stoppable mainApp) throws IOException { private MainWindow createMainWindow(Stage stage, Stoppable mainApp) throws IOException{ FXMLLoader loader = new FXMLLoader(); - loader.setLocation(Main.class.getResource("ui" + File.separator + "mainwindow.fxml")); + + /* Note: When calling getResource(), use '/', instead of File.separator or '\\' + * More info: http://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html#res_name_context + */ + loader.setLocation(Main.class.getResource("ui/mainwindow.fxml")); + stage.setTitle(version); stage.setScene(new Scene(loader.load(), INITIAL_WINDOW_WIDTH, INITIAL_WINDOW_HEIGHT)); stage.show();