This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "simulate enter key in jtextfield" Watch "simulate enter key in jtextfield" New topic
Author

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: http://www.chitgoks.com
Tech Blog: http://tech.chitgoks.com
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?
-> http://download-llnw.oracle.com/javase/6/docs/api/java/awt/Robot.html


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
Sheriff

Joined: Oct 13, 2005
Posts: 38033
    
  22
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.
 
wood burning stoves
 
subject: simulate enter key in jtextfield
 
Similar Threads
VK_TAB event not working
SWING JTextField (No "PlainDocument usage")
Character by Character input
JTextField and KeyEvents ...
keypress + Robot + Method