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

Issue when a css file is using a classpath-relative path for an image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u40
    • javafx
    • None

      Good day

      Have the style
      .background {
      -fx-background-image: url("/skin/blues/def/img/bg.png");
      -fx-background-size: stretch;
      }

      This style is available in the file base.css

      Have the panel

      <AnchorPane fx:id="rootPane" styleClass="background" xmlns:fx="http://javafx.com/fxml">
        <stylesheets>
          <URL value="@../../../../base.css" />
        </stylesheets>
      </AnchorPane>


      Background is not displayed in the Scene Builder and in previev window. In normal application launch - background displayed.

      http://clip2net.com/s/2orCA

      All files are in the jar-file.
      In Scene Builder version 1.0, the same problem

            jcambon Jerome Cambon
            valexandejfx Vorobyev Alexander (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: