File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes simulate enter key in jtextfield Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "simulate enter key in jtextfield" Watch "simulate enter key in jtextfield" New topic

simulate enter key in jtextfield

mark goking
Ranch Hand

Joined: Aug 18, 2009
Posts: 155
hi... if anyone has done this before and made it work

please do share your code

i tried this code but it doesnt work

Website/Java Games:
Tech Blog:
Peter Taucher
Ranch Hand

Joined: Nov 18, 2006
Posts: 174
And what would it be that you want to achieve with this piece of code? Why not use the Robot class?

Censorship is the younger of two shameful sisters, the older one bears the name inquisition.
-- Johann Nepomuk Nestroy
mark goking
Ranch Hand

Joined: Aug 18, 2009
Posts: 155
i got it though. i wanted to avoid using robot ;)

please close this thread
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 41531
We don't close threads unless there is something "wrong" with them. You never know, somebody might have a better suggestion in future.

Please click the "mark as resolved" button with the tick at the lower left.
I agree. Here's the link:
subject: simulate enter key in jtextfield