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 asJDK-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).
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
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).
- duplicates
-
JDK-8222317 SwingNode or SwingNode content doesn't resize as expected under Windows 10
- Closed
- relates to
-
JDK-8170386 JLightweightFrame content can miss paint events on Windows
- Closed
-
JDK-8193103 JavaFX SwingNode demo does not render intially on HiDPI Windows system
- Closed
-
JDK-8298798 Swing text displayed in a JavaFX SwingNode is blurry on HiDPI system
- Closed