Scene listenMenu = new Scene(root, 250, 272);
listenMenu.getStylesheets().add(\"styles.css\");
This always worked for me to load my css file, but after
If you are using scene.getStylesheets().add("com/whatever/stylesheet.css");
You have to link the whole path where it is located including the package after the src
folder, not the src
folder itself though.
If you are using scene.getStylesheets().add(getClass().getResource("stylesheet.css").toExternalForm());
The css file has to be located in the same dir as the java file you are loading it from. You only have to provide the file name.
If you are wanting to make it in a resource
folder in the src
folder then do that. If not I don't know how.