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

Alexandr Scherbatiy alexandr.scherbatiy at oracle.com
Tue Jun 7 15:44:59 UTC 2016

Hello Hendrik,

I slightly updated your fix to return a multi-resolution image with base 
icon size when icon size is greater than the real icon size. This allows 
to draw a high-resolution icon to the same bounds on JOptionPane.

I have not found the solution for the native toolbar icons yet. An icon 
with IDB_VIEW_SMALL_COLOR has size 16x16 on my Windows 8.1. The 
GetSystemMetrics(SM_CXSMICON) returns 32. It is a question for me should 
IDB_VIEW_SMALL_COLOR icon has the same size as the 
An icon with IDB_VIEW_LARGE_COLOR returns also icon with size 16x16 and 
the returned image contains only one quarter of the original picture.

I left the code for the toolbar icons as it was before so it uses low 
resolution IDB_VIEW_SMALL_COLOR icons.
I think it can be fixed as a separated issue.


On 4/19/2016 2:30 PM, Hendrik Schreiber wrote:
>> On Mar 22, 2016, at 17:43, Hendrik Schreiber <hs at tagtraum.com> wrote:
>>> I created an application in Visual Studio and try to check the returned icon size.
>>> It returns the same size 16 for both IDB_VIEW_SMALL_COLOR and IDB_VIEW_LARGE_COLOR.
>> Really? That would contradict the documentation. Unfortunately, I currently don’t have access to a working Visual Studio installation. Next week will be better.
> Hey Alexandr,
> I finally had a chance to look at this again and can only confirm your findings. For some reason, Windows always returns a 16x16 icon, regardless of whether you asked for IDB_VIEW_SMALL_COLOR or IDB_VIEW_LARGE_COLOR.
> I’m at a loss. If Windows does not provide appropriate icons, what should we do?
> -hendrik

More information about the awt-dev mailing list