RFR: 8064922: [macos] Test javax/swing/JTabbedPane/4624207/bug4624207.java fails

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Sep 19 06:24:16 UTC 2025


On Fri, 19 Sep 2025 06:00:44 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> When looking into this, it looks like macOS does not support mnemonics. It would therefore make sense to exclude macOS from this test as its main purpose is to test mnemonics on JTabbedPanes. Updated the test header to exclude macOS and test's keyPresses to remove the macOS specific inputs.
>> 
>> https://discussions.apple.com/thread/7983221?sortBy=rank
>
> test/jdk/javax/swing/JTabbedPane/4624207/bug4624207.java line 96:
> 
>> 94:             robot.keyPress(KeyEvent.VK_ALT);
>> 95:             robot.keyPress(KeyEvent.VK_B);
>> 96:             robot.keyRelease(KeyEvent.VK_ALT);
> 
> keyRelease should be other way around...ie VK_B first and then VK_ALT

Also you may want to check another test `EditableFocusTest` which also sets mnemonic "B" on a JButton and it passes in macOS..One difference is it uses setMnemonic(char) instead of setMnemonic(int)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27371#discussion_r2361903770


More information about the client-libs-dev mailing list