This is my directory tree:
I am not able to load theese fxml from their location in my code.
For example, in Main.java
FXMLLoader loader = new FXMLLoader();
loader.setLocation(Main.class.getResource("MainInterface.fxml"));
Scene scene = new Scene(loader.load());
primaryStage.setScene(scene);
primaryStage.show();
but this goes into an error:
Exception in thread "main" java.lang.RuntimeException... Caused by: java.lang.IllegalStateException: Location is not set.
How do I do that?
Thank you all.