java - Typing into a JTextField enables a button. Is it wrong to use a KeyListener? -


i have button called "save changes" save changes if changes detected in jtextfield component. now, assume if user types anything, content has changed.

i using keylistener, this question sounds using other actionlistener wrong?

you can add documentlistener document of jtextfield. actionlistener gets called when used presses enter. advantage of using document listener can detect changes made other means typing.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -