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

Attach css to scene documented method doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • None
    • docs
    • None
    • Mac OS X 10.6, Netbeans 7.1 beta, Java version "1.6.0_26"

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: