Hi Pankaj,

Have you checked for JMenuItem too? It seems we have similar updateMnemonicBinding in BasicMenuUI too which is not modified.

Regarding the test, I think it will be good if you create the option pane dialog "when" JMenu is selected and not "after". Also, you can probably iterate for different installed look and feels instead of testing only the default L&F.

Regards
Prasanta
On 3/26/2018 5:36 PM, Pankaj Bansal wrote:

Hi All,

Please review the test only fix for JDK 11.

Bug:

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

webrev:

http://cr.openjdk.java.net/~pbansal/8194873/webrev.00/ <http://cr.openjdk.java.net/%7Epbansal/8194873/webrev.00/>

Issue:

The right ALT key is not working as mnemonic for some Swing components like JMenu or JOptionsPane. The left ALT key works fine.

Fix:

This issue was introduced when a check for VK_RMENU was added in GetJavaModifiers function in awt_Component.cpp. Windows gives true for both VK_MENU and VK_RMENU when right ALT (ALT_GRAPH ) key is pressed. Due to which extra bits are set on modifiers. So the mnemonic bindings should be updated to work with both ALT and (ALT+ALT_GRAPH) modifiers. Changes have been made in mnemonic bindings.

Regards,

Pankaj Bansal


Reply via email to