JDK-8147440 : HiDPI (Windows): Swing components have incorrect sizes after changing display resolution
Type:Bug
Component:client-libs
Sub-Component:javax.swing
Affected Version:9
Priority:P2
Status:Resolved
Resolution:Fixed
Submitted:2016-01-15
Updated:2017-02-23
Resolved:2017-02-08
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
OS: Windows 8 + HiDPI display, JDK9 b100
Please run any swing application and switch display resolution (high -> low -> high). The components have invalid size.
Comments
The proposed fix: http://cr.openjdk.java.net/~alexsch/8147440/webrev.02/
The review thread: http://mail.openjdk.java.net/pipermail/awt-dev/2017-February/012563.html
02-02-2017
See also
JDK-8147566 [hidpi] invalid repaint when moving test app from one display to another
JDK-8147016 [hidpi] invalid repaint for multiresolution image when switching display resolution (Windows)
17-01-2017
the issue is also reproducible on Windows 10 with JDK9 b135.
the special case - please try to run the SwingSet2 on dual-screen with, e.g., scale = 175% and 125%, correspondingly.
Please try to move the app from one display to another and drag mouse over the buttons, then move it back and again move the cursor over the buttons - you'll see some mess there. So there is even no need to switch the display resolution - please see "dual_screen_NOK.png".
13-09-2016
probably(?) the issue is also highly visible when working with projector
13-09-2016
The initial fix is on the review: http://mail.openjdk.java.net/pipermail/awt-dev/2016-March/010912.html
But it requires additional investigation for undecorated frames which work in different way.
12-09-2016
Alexandr, Please describe what is a reason to defer and impact if this is not fixed in 9
09-09-2016
Sometimes when the settings weren't accepted and reverted by the OS automatically after several seconds, the application could even freeze
15-01-2016
I guess the issue is closely related to JDK-8147016 (probably a duplicate)