File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 42292
    
  64
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: 42292
    
  64
Yes, you'd add it to the TextField.
Darren Alexandria
Ranch Hand

Joined: Aug 17, 2007
Posts: 185
Thanks!

God bless.
 
wood burning stoves
 
subject: Add Enter Key Value in Input Box