wood burning stoves*
The moose likes Applets and the fly likes Add Enter Key Value in Input Box Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Add Enter Key Value in Input Box" Watch "Add Enter Key Value in Input Box" New topic
Author

Add Enter Key Value in Input Box

Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Good day!

How can I add an "Enter Key Value" in a input field after it has been filled with data?
My data is coming from a barcode reader.

I have tried to read a barcode that will set the barcode reader with an enter and a double
enter key, but this doesn't work.

What I am trying to do is to automatically generate data with the given data that will be inputted
in the input box, without clicking any button.

Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
What do you mean by "add an "Enter Key Value" in a input field" - do you want to wait until the field has been populated, and then append a newline (or carriage return character) to it? if so, I think you can add an ActionListener to it; that will be called whenever the contents of the field change.


Ping & DNS - my free Android networking tools app
Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Yes, you got my point.
So what I should do now is to add an Action Listener to the applet code?

Thanks so much.

Darren
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41089
    
  44
Yes, you'd add it to the TextField.
Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Thanks!

God bless.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Add Enter Key Value in Input Box
 
Similar Threads
Barcode input
Bar Code Reader
Getting the value of a input box in an applet?
Running Javascript from Input Tag
Fire input text event Without Loosing Focus