title: How to use TextChanged event?
body: <p>I have a text box in which the user enters a unique number. After he enters a number and press tab or enter. I want to write query to search record matching to that unique number. The number is an integer. It will be passport no, pan card no or etc. If it is available in database, I want to display all information of that user. </p>
  
  <p>I don't want to do that on button click. </p>
  
  <p>I was looking for some <code>TextChanged</code> event but I found that the alternative in Java is the methods in document listener. But I am not getting how to use that. Also in Netbeans in the design view it does not show me any event on text changed. How to use <code>Documentlistener</code> to my <code>JFrame</code>/how to fix this?</p>