How do you get the VK code from a char that is a letter? It seems like you should be able to do something like javax.swing.KeyStroke.getKeyStroke(\'c\').getKeyCode()<
There are 2 ways I found:
A. Use a workaround of JButton.setMnemonic, getMnemonic:
javax.swing.JButton but = new javax.swing.JButton();
but.setMnemonic(charVkValue);
int intVkValue = but.getMnemonic());
B. Download open jdk source and see its AbstractButton.setMnemonic(char) method. This code is licensed under GPL2, but these 4 lines do generally the same as the answer with "keyPress(48+(int)c)".
http://www.java2s.com/Open-Source/Java-Document/6.0-JDK-Core/swing/javax/swing/AbstractButton.java.htm