Hi, Pankaj.

The updateCheckIcon() was a private method in the public class from the
javax.swing.plaf.basic package you cannot simply make it protected.

Can you please provide some more details why the call to updateCheckIcon()
break the resize?


On 1/23/20 3:05 am, Pankaj Bansal wrote:
Hi All,

Please review the following fix for jdk15.


Bug:

https://bugs.openjdk.java.net/browse/JDK-8216329

webrev:

http://cr.openjdk.java.net/~pbansal/8216329/webrev00/

Issue:

The JCheckBoxMenuItem is not being resized properly when setHorizontalTextPosition 
is called on it. This results in some text getting truncated from the end. The 
issue is specific to Synth L&F.

Cause:

The present bug is a regression of [1].

Fix:

The problem in [1] was specific to Windows L&F. but the fix was done in BasicMenuItemUI 
which is shared by all the L&F. The current fix moves the fix done for [1] to Windows 
L&F specific code. This fixes the current issue. I have run the tests that was added 
for [1]. All works fine.

[1] https://bugs.openjdk.java.net/browse/JDK-8152981


Regards,
Pankaj Bansal



--
Best regards, Sergey.

Reply via email to