title: <JTable>.getSelectedRow() is returning -1
body: <p>I have written a "double-click" event on my <code>JTable</code>. My JTable, viz. myTaskTable is populated with a number of rows having multiple columns. I want the row index to be retrieved when I double click on one of the rows of the <code>JTable</code>. I am not sure why is it always returning me an index of -1 resulting in an exception. Am I am overlooking something? What could be going wrong?</p>
  
  <p>This is how I am retrieving the index of the selected row from the <code>JTable</code> - myTaskTable</p>
  
  <pre><code>int selRow = myTaskTable.getSelectedRow();
  </code></pre>
  
  <p>Thank you!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Here is the code:</p>
  
  <pre><code>...
  myTaskTable.addMouseListener(this);
  ...
  public void mouseClicked(MouseEvent e)
  {
   if(e.getModifiers() == MouseEvent.BUTTON1_MASK)
   {
     if(e.getClickCount() == 2)
     {
       e.consume();
       int selRow = myTaskTable.getSelectedRow();
       System.out.println("GridReport double clicked on row="+selRow);
      }
    }
  }
  </code></pre>