D
D
Dmitry2017-10-17 10:51:39
Java
Dmitry, 2017-10-17 10:51:39

How to set Cyrillic in mnemonics for JMenu (mnemonics localization)?

How to set a Cyrillic letter as a mnemonic for a menu?
This is the code that works:

JMenu file = new JMenu("File");
file.setMnemonic('F');

And if the menu is in Russian, then no:
JMenu file = new JMenu("Файл");
file.setMnemonic('Ф');

At the same time, the mnemonic itself works out, i.e. when you start the program in the menu, the letter "F" is underlined, but the menu is not activated by alt + F.
At the same time, Russian mnemonics work for JMenuItem and other menu items.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question