I need to add the file style.css as stylesheet to a scene. I am trying to do this inside the class ScreenController which is in the package justAnotherChessGame.model. The file is in the same directory but in a different package. How can I find the relative path? Project structure
If your scene is
sc and pane is
Scene sc = new Scene(p, 400, 300); sc.getStylesheets().add("/justAnotherChessGame/view/style.css"); primaryStage.setScene(sc);
You need to study about this case.