<AWT Dev> Review request for 8151385: [hidpi] JOptionPane-Icons only partially visible when using Windows 10 L&F

Hendrik Schreiber hs at tagtraum.com
Mon Mar 7 15:47:22 UTC 2016

Hey there,

Could someone please review this fix for JDK8u.

https://bugs.openjdk.java.net/browse/JDK-8151385 <https://bugs.openjdk.java.net/browse/JDK-8151385>

https://www.beatunes.com/download/webrev-8151385.zip <https://www.beatunes.com/download/webrev-8151385.zip>

On Windows 10 with a HiDPI display, the icons in JOptionsPanes are only partially displayed (screenshot in the bug report).

Changed the methods that create BufferedImages from Windows bitmaps so the actual bitmap size is taken into account.
Background: Windows 10 delivers differently sized bitmaps based on display resolution.

Automated Test:
The error icon displayed by JOptionsPanes is round and as such the pixels in all four corners are identical (transparent).
If the error occurs, at least the pixel in the lower right corner is not the same as the one on the upper left corner. The test checks, that the pixels in all four corners are identical. This makes sure the test also succeeds on standard DPI displays.

For the test to actually fail (without the fix), this test needs to be run on a Windows 10 system with a HiDPI display.

I have tested this on Windows 7 and Windows 10.
I have not tested it on Vista or Windows 8.x.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160307/7162b25b/attachment.html>

More information about the awt-dev mailing list