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

JFXPanel: race condition when setting scene

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 7u10
    • Fix Version/s: tbd
    • Component/s: javafx
    • Environment:

      Win64 JRE7u10

      Description

      As discussed on the mailing list in thread "JFXPanel ignores size change of root node" the following is a workaround to force a JFXPanel to resize itself when the scene's size has changed:

                Scene scene = getScene();
                setScene(null);
                setScene(scene);
                invalidate();

      In the attached testcase this seems to work for about 70-90% of all attempts. Adding a sleep between setScene(scene) and invalidate makes it 100%. On my core i5 with 2.6 Ghz the 10ms sleep is enough while 9ms is not. YMMV.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wlehmann Werner Lehmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported: