Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet action listener

 
krishna krottapalli
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my scenario is a s below:

i have an applet with 10 fields in it. i need an action listener such that when you click on a particular field, a variable should be assigned to a value. once the cursor is out of the same field, the variable should be re assigned to the old/default value.
i am able to code the assigning part. please help in re-assigning the variable to old or default value once anything is clicked or selected out of that field.

thanks,
krishna
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If these are text fields, then the "action listener" you're looking for is a Focus Listener. The events it supports are "focus gained" and "focus lost", which are what you described. The tutorial is here: How to Write a Focus Listener.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And, welcome to the Ranch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic