posted 23 years ago
javax.swing.JButton button;
button.setText("abcdefg");
button.setMnemonic('c');
The result is that the 'c' letter on your button is underlined and the actions that are triggered by a click on the button will be triggered in the same way by ALT - c from the keyboard.
"JavaRanch, where the deer and the Certified play" - David O'Meara