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

[CSS] applet cannot load css file relative to classpath

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Withdrawn
    • Icon: P3 P3
    • 8u40
    • 8u40
    • javafx
    • None

      Run this in a browser and the console spits out 'Resource "/fxtest/test.css" not found' even though fxtest/test.css is in the jar.

          @Override public void start(Stage stage) {

              final Button button = new Button("Button");

              Scene scene = new Scene(new StackPane(button), 200, 200);
              scene.getStylesheets().add("/fxtest/test.css");
              stage.setScene(scene);
              stage.show();

          }

      It appears that the calls to StyleManager method getURL need to be wrapped in a doPriv

            dgrieve David Grieve
            dgrieve David Grieve
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: