Well, if you are using 1.4 you can just setMnemonicAt(int tabIndex, int mnemonic).
setMnemonicAt
public void setMnemonicAt(int tabIndex,
int mnemonic)
Sets the keyboard mnemonic for accessing the specified tab. The mnemonic is the key which when combined with the look and feel's mouseless modifier (usually Alt) will activate the specified tab.
A mnemonic must correspond to a single key on the keyboard and should be specified using one of the VK_XXX keycodes defined in java.awt.event.KeyEvent. Mnemonics are case-insensitive, therefore a key event with the corresponding keycode would cause the button to be activated whether or not the Shift modifier was pressed.
This will update the displayed mnemonic property for the specified tab.
Parameters:
tabIndex - the index of the tab that the mnemonic refers to
mnemonic - the key code which represents the mnemonic
Throws:
IndexOutOfBoundsException - if tabIndex is out of range (tabIndex < 0 || tabIndex >= tab count)
Since:
1.4
If not - I suggest that you read the code for how they did it in 1.4 and do that yourself.