0

In java, I'm able to invoke the actionlistener of a jTextField by pressing the 'Enter' key on the keyboard. How can I do the same by clicking on a jButton. i.e. the jButton will act as the 'Enter' key. It means I want to induce the 'Enter' key press functionality but without using the keyboard but with the click of a button. How can I achieve this?

Andrew Thompson
  • 166,747
  • 40
  • 210
  • 420

0 Answers0