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

Attach css to scene documented method doesn't work

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: docs
    • Labels:
      None
    • Environment:

      Mac OS X 10.6, Netbeans 7.1 beta, Java version "1.6.0_26"

      Description

      On this page : http://download.oracle.com/javafx/2.0/css_tutorial/jfxpub-css_tutorial.htm
      is docummented that to apply a css to a scene method you use : scene.getStylesheets().add("path/to/css/file") but it doesn't work, the css file on the same package as the scene. I have to use : scene.getStylesheets().add(getClass().getClassLoader().getResource("package/name/css/file").toString()) to be able to got the css applied.
      Attached a sample project with the two ways to apply the css: the fail and work methods.

        Attachments

          Activity

            People

            • Assignee:
              jgordon Joni Gordon
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: