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

Harshitha Onkar honkar at openjdk.org
Wed Oct 22 18:50:30 UTC 2025


On Wed, 24 Sep 2025 04:10:24 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>>> 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)
>> 
>> I see that test's `setMnemonic`. This tabbedPane's API is forced to use `setMnemonicAt(int, int)`. I figured, since mnemonics don't seem to be supported on macOS anyway, it does not really make sense to ProblemList this test for macOS only, and instead just exclude macOS from the test since the test fails with the current implementation using `setMnemonicAt`.
>
> It is not macOS but Aqua L&F problem it seems...
> javax/swing/JTabbedPane/8134116/Bug8134116.java also uses `setMnemonicAt` but it uses Nimbus and it seems to pass on macOS as per CI
> but I guess its ok to restrict as native macOS where it doesn't seem to work will run on its own Aqua L&F kind of interface

Even with Nimbus LaF `javax/swing/JTabbedPane/8134116/Bug8134116.java` the mnemonic is set as VK_Z for tab "zero" and though 'z' is underlined it does not respond to the keypress. Looks like it does not work completely in Nimbus LaF too.

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

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


More information about the client-libs-dev mailing list