Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Beginning Java and the fly likes Enter Key Triggers Action Event on JTextField Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Enter Key Triggers Action Event on JTextField" Watch "Enter Key Triggers Action Event on JTextField" New topic
Author

Enter Key Triggers Action Event on JTextField

Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Can someone point me in the write direction for this operation? I am having coders block this morning.
Thanks

------------------
Happy Coding,
Gregg Bolinger
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Gregg,
Just use the method addActionListener on the JTextField.
Regards,
Manfred.
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

LOL, thanks. I did that right after I posted this and it was working. Like I said, programmers block today.

------------------
Happy Coding,
Gregg Bolinger
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Enter Key Triggers Action Event on JTextField