• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTextField - DocumentListener  RSS feed

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo

I have a text field and I want to know when the field is changed by the user, for this I add a DocumentListener to the Document (see the code)



Some times the text field content is set via setText and this generates eventa also, It is posible to make a differene between the case when the user interact with the GUI (text field) and the case when the applicationsets the text field content(via filed.setText(...))?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!