Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8113118

CSS as external files can not be added

XMLWordPrintable

      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.

            jgiles Jonathan Giles
            mweidemanjfx Matthias Weidemann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: