I would like to assign a mnemonic to a JMenu
using resource bundles (or the ResourceMap
). So for example, the code without resource file would be...
JMenu fileMenu = new JMenu();
fileMenu.setText("File"); // this would be read from a resource file
fileMenu.setMnemonic('F'); // but the docs say this is obsolete
fileMenu.setMnemonic(KeyEvent.VK_F);
So how do I put the KeyEvent.VK_F in a resource file?
For a JMenuItem
I can do it with actions, but this is JMenu
.