Sets the keyboard mnemonic on the current model. The mnemonic is the key which when combined with the look and feel's mouseless modifier (usually Alt) will activate this button if focus is contained somewhere within this button's ancestor window.
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
.
These codes and the wider array of codes for international
keyboards may be obtained through
java.awt.event.KeyEvent.getExtendedKeyCodeForChar
.
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.
If the character defined by the mnemonic is found within the button's label string, the first occurrence of it will be underlined to indicate the mnemonic to the user.
mnemonic | the key code which represents the mnemonic |
java.awt.event.KeyEvent, setDisplayedMnemonicIndex
@beaninfo
bound: true
attribute: visualUpdate true
description: the keyboard character mnemonic
Diagram: Button