Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easiest way to check for change of textField content?

Status
Not open for further replies.

paulbradley

Programmer
Oct 9, 2002
158
GB
I want to perform some actions upon the edit of a the content of a textField. Is a documentListner the easiest way? I've looked at these and they seem a bit complex.
 
I think a DocumentListener is your best bet. You should be able to detect actual 'edit' type actions by the user. If you less demanding in what you interpret as an 'edit', then a combination of KeyListener and MouseListener might be easier to figure, but they would fire when anything happens inside the field, whether anything was changed or not.

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top