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

JavaFX SwingNode does not always render initially on Windows

XMLWordPrintable

      To reproduce, run the attached test program on a Windows platform using a recent JDK + JavaFX. For example, it reproduces using JDK 19 + JavaFX 19 and also reproduces using the latest JDK 20 ea and JavaFX 20 ea.

      1. Run the program: "java SimpleSwingNodeTest"

      2. BUG: The Swing content in the SwingNode will not initially be displayed. See "SwingNode-Windows-initial.png".

      3. Mouse over the black rectangle where the label and button should be

      4. BUG: The JButton is now displayed, but the JLabel is not. See SwingNode-Windows-2.png

      5. Maximize and then restore the window using the window decoration controls

      6. It will now be drawn correctly. See SwingNode-Windows-final.png.

      NOTE: This was originally filed as JDK-8193103, which was closed as a duplicate of JDK-8170386, and that bug was later closed as Incomplete.

      Note also that on a Hi-DPI Windows system the text in the SwingNode is blurry, so I'll file a separate bug (against javafx.swing rather than client-libs).

            psadhukhan Prasanta Sadhukhan
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: