title: JTable selection change event handling: find the source table dynamically
body: <p>I've implemented my own event handler and added it to the selection model of the table:</p>
  
  <pre><code>table.getSelectionModel().addListSelectionListener(event);
  </code></pre>
  
  <p>And implemented the method for "event" (mentioned above):</p>
  
  <pre><code>public void valueChanged(ListSelectionEvent e) {
      log.debug("value changed");
  }
  </code></pre>
  
  <p>Unfortunately the event fires twice if I chance the selection and it doesn't seem possible to find the associated table, because e.getSource provides javax.swing.DefaultListSelectionModel.</p>
  
  <p>Hence my questions are:</p>
  
  <p>1) Why does it fire twice although the eventListener is only registered once?</p>
  
  <p>2) How can I find the table for which the selection applies? The DefaultListSelectionModel doesn't seem to offer any getSource() or similar.</p>
  
  <p>Many thanks!</p>