0

Every time I start my program it runs the GUI window and one of the button is always selected. I'm not sure what this is called so I couldn't find any useful information on it. Right now when I start the program one of the button is selected so that if I pressed the "Space Bar" it'll click the button that is selected. I need to use the "Space Bar" as another keybinding command so I'd like to get rid of that pre-selection of the JButton. How would I do this? If I'm not being very clear maybe I can give some examples to help but I'm not sure what to show to make it clearer.

Basically I want the "Space Bar" to activate a keybinding command instead of activating the JButton that's selected.

Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373
user2318083
  • 567
  • 1
  • 8
  • 27

0 Answers0