On Wed, 24 Sep 2025 04:10:24 GMT, Prasanta Sadhukhan <[email protected]> 
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

Reply via email to