title: java documentlistener
body: <p>I'm trying to call method after changing text of JTextField.</p>
  
  <pre><code>textField.getDocument().addDocumentListener(new DocumentListener()
          {
  
              public void changedUpdate(DocumentEvent arg0) 
              {
                  System.out.println("IT WORKS");
                  panel.setPrice(panel.countTotalPrice(TabPanel.this));
              }
              public void insertUpdate(DocumentEvent arg0) 
              {
  
              }
  
              public void removeUpdate(DocumentEvent arg0) 
              {
  
              }
          });
  </code></pre>
  
  <p>When I call this method at another ActionListener, it works ok. But when I change text in text field, nothing happens. Even println. Any suggestions?</p>