title: how to find source component that generated a DocumentEvent
body: <p>Is it possible to discover which oject generated a DocumentEvent? Something like i can do with ActionListener:</p>
  
  <pre><code>JTextField field = new JTextField("");
  field.addActionListener(actionListener);
  
  //inside ActionListener
  public void actionPerformed(ActionEvent arg0) {
    if (arg0.getSource() instanceof JTextField) //true
  
  }
  </code></pre>
  
  <p>I would like to do the same with DocumentEvent but seems not to work the same way:</p>
  
  <pre><code>JTextField field = new JTextField("");
  field.getDocument.addDocumentListener(documentListener);
  //inside documentListener
  public void insertUpdate(DocumentEvent){
    if (arg0.getSource() instanceof JTextField) //false: class is javax.swing.text.PlainDocument
    if (arg0.getSource() instanceof MyComponent){
        MyComponent comp = (MyComponent)arg0.getSource();
        comp.callSpecificMethodUponMyComp(); 
    }
  }
  </code></pre>
  
  <p>The answser should take in consideration the following points:</p>
  
  <ol>
  <li>For my purposes knowing the object type that generated the event isn't enough, but i need a reference to it at runtime.</li>
  <li>Typically the events are generated from extension of the swing object (myComp public JTextField). These objects store additional information that should be retrieved at runtime inside the listener method (es. insertUpdate)</li>
  <li>DocumentListener is implemented from a class that is unaware of the fields that generated the events. Differents fields of differents types can be attacched to the listener at runtime.</li>
  </ol>