Fixed file paths so they work when it becomes an executable

- Changed file paths for the FXML files
main
Fan-Wu Yang 9 years ago
parent ee72d85f6a
commit c105c2d01e

@ -39,7 +39,7 @@ public class App extends Application {
//load the first container
try {
FXMLLoader loader = new FXMLLoader();
InputStream in = getClass().getClassLoader().getResourceAsStream("scenes//mainpane.fxml");
InputStream in = getClass().getClassLoader().getResourceAsStream("scenes/mainpane.fxml");
mainContainer = (BorderPane) loader.load(in);
mainScene = new Scene(mainContainer, 1200, 800);
primaryStage.setScene(mainScene);
@ -63,7 +63,7 @@ public class App extends Application {
*/
public void loadPane(String fxmlName) throws Exception {
FXMLLoader loader = new FXMLLoader();
InputStream in = getClass().getClassLoader().getResourceAsStream("scenes//" + fxmlName);
InputStream in = getClass().getClassLoader().getResourceAsStream("scenes/" + fxmlName);
Parent page;
try {
page = (Parent) loader.load(in);

Loading…
Cancel
Save