title: Deselecting the selected row in a JTable
body: <p>I have created a UI using Swing with a JTable. I have implemented a <code>ListSelectionListener</code> through which I am able to fetch records based on the selected row in the table. I am unable to deselect the row after selection.</p>
  
  <p>So basically I should be able to select a row with one click and then I should be able to deselect the row with another click.</p>
  
  <p>I tried using <code>tableName.getSelectionModel.clearSelection</code>, but I don't know how to see if a row is selected or not. What would tell me this?</p>
  
  <p>Another solution I tried is using a Mouse Click Listener. Again, I am not able to write the condition to check if the mouse click happens on the previously selected row. Is there a way by which I can get the previous row selected?</p>
  
  <p>I am using the <code>DefaultTableModel</code>.</p>