Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Add Enter Key Value in Input Box

 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you'd add it to the TextField.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!

God bless.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic