Hi, Avik.
In the fix you update getIconWidth() and getIconHeight, so now we take
the Icon into account. but it seems if the Icon is bigger that the
maximum size it will not be resided to 16x16, right?
On 14/01/16 07:49, Avik Niyogi wrote:
Hi All,
Kindly review the bug fix for JDK 9.
*Bug:*
https://bugs.openjdk.java.net/browse/JDK-8146321
*Webrev:*
http://cr.openjdk.java.net/~aniyogi/8146321/webrev.00/
*Issue:*
Under the Mac Look&Feel, if an icon type other than an ImageIcon is used
in JInternalFrame.setFrameIcon(),
the icon will show up in the wrong position.
*Cause:*
the "instanceof Icon" was not checked for. Also, customs ImageIcon with
color fill (and no image URL) which would
have resulted in null value for resized ImageIcon image was not well
handled.
*Fix:*
All places in Aqua LAF where "instanceof Icon” (and not just ImageIcon
class) is required,
inputs were added after significant analyses.
Check for null for getImage was done to remove a Null Pointer Exception.
With Regards,
Avik Niyogi
--
Best regards, Sergey.