We seem to not be able to add a File to the scenes' stylesheets.
Example:
@Override
public void start(Stage stage) {
VBox root = new VBox();
Scene scene = new Scene(root);
stage.setScene(scene);
Label l = new Label("bla");
root.getChildren().add(l);
stage.setVisible(true);
scene.getStylesheets().add("controlStyle.css");
}
Error: Cannot add stylesheet. Resource "controlStyle.css" not found.
If i open a FileOutputStream on the same file, it is found and accessible.
Example:
@Override
public void start(Stage stage) {
VBox root = new VBox();
Scene scene = new Scene(root);
stage.setScene(scene);
Label l = new Label("bla");
root.getChildren().add(l);
stage.setVisible(true);
scene.getStylesheets().add("controlStyle.css");
}
Error: Cannot add stylesheet. Resource "controlStyle.css" not found.
If i open a FileOutputStream on the same file, it is found and accessible.