Space character as accelerator in JMenuItem not rendered (correctly)

Hendrik Schreiber hs at tagtraum.com
Thu Mar 6 00:01:23 PST 2014


Hi,

when using the space character as accelerator for a JMenuItem, it is not rendered correctly (I guess a ' ' is rendered, but that's kind of hard to see ;-).
OS X applications like iTunes (in the controls menu) do render the word "Space", localized to the current locale.

This is how it fails:

action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0));
new JMenuItem(action);

Is this a known issue? I wasn't able to find it on https://bugs.openjdk.java.net

Thanks,

-hendrik



More information about the macosx-port-dev mailing list