Originally posted by David Nemeskey:
Thanks for your answer, but I already know that.
What I would like to know, if I have a character, like 'N', how do I get its key code; that is, KeyEvent.VK_N. I don't know the character at compile-time; it is read from a file, so the code has to be generic. It should be without any ASCII magic, only by calling API methods.
In your case you can write a method which will return the required char and call it like
The implementation of the getMyMnemonicChar() will have code to load the appropriate resource bundle and stuff.
[ July 10, 2008: Message edited by: Maneesh Godbole ]