JFXPanel: race condition when setting scene

XMLWordPrintable

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

      Win64 JRE7u10

      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.

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

              Created:
              Updated:
              Imported: