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

getStyleClass().add("style") causes CSS to update before the control is part of the scene

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 7u6
    • 8
    • javafx

    Description

      See JavaFX forum: https://forums.oracle.com/forums/thread.jspa?forumID=1385&threadID=2430102
      This thread points to JFXtras as the source of the bug. But another user found otherwise:

      {quote}
      The getStyleClass().add("style"); call seems to be executed before the control is part of the scene in my control. This would lead to the warning because it could not find the styles from caspian.css. Because the layoutChildren() method will be called again after the control is part of the scene it will render like expected. So if I'm right I have to call the visualization code only if the control is part of a scene and the warnings should be gone right? I will check that later and let you know if that fixes the problem.
      {quote}

      The user confirms:

      {quote}
      just would like to let you know that the problem is fixed, it was really like I said in my last mail, now everything is fine and the warnings are gone.
      {quote}

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported: