title: JTable how to fire event selecting a row or double click on a row
body: <p>I'm using a javax.swing.JTable to show rows in a database table.
  I need to fire two different event for two different cases:</p>
  
  <ul>
  <li>when is selected at least a row (or a click on at least a row is performed).</li>
  <li>when a double click on a row is performed.</li>
  </ul>
  
  <p>I already looked for an answer on stack overflow, but I didn't find anything satisfying .
  Any idea?</p>