Im a little stuck with my current swing project. I would like to be
able to press a single button on the keyboard, and have that press trigger
actionPerformed.
--What I have tried:
I have looked at setMnemonic, but would prefer to not have to use alt, or have
the action key letter underlined.
I have looked at setAccelerator, but would like to have it independant from
menu items
I have looked at keyListener/Typed/Pressed/Released, but would prefer have it
independant from any textField/Areas
--What I am looking for:
Option 1:
user presses F2, actionPerformed is notified
Option 2:
user presses 'b', the letter 'b' key is linked to a JButton, which gets
"doClick()ed", which notifies actionPerformed as if it had been mouse clicked
normally
If this is possible, any ideas would be greatly appreciated. :) Thanks so much
for the space.