Hi, I used a JButton in an application, which handles a particular function but i can only click it mouse how can i use or activate the enter key. So that i can handle it from keyboard also. Thanks and Regards.
Have you tried creating a simple form with just a few controls? And then pressing Tab until the focus is on the JButton? Because that should work just fine.
Alternatively, you can set a button's mnemonic which will allow you to press Alt+<mnemonic> to activate the button.