I tried to use CSS in JavaFX 2.0. But it doesn't work. I tried to import a CSS file:
// Import CSS
Group root = new Group();
Scene scene = new Scene(root, 300, 250, Color.LIGHTGREEN);
scene.getStylesheets().add("example.css");
But NetBeans always throws the following exception:
WARNING: com.sun.javafx.css.StyleManager$2 run Resource "null" not found.
I tried to put the CSS file in the project directory, into the src directory and to use a absolute path: "C:\\Users\\janus\\Documents\\NetBeansProjects\\example.css"
Nothing solved the problem