title: I can't modify the selected row in JTable with clicking
body: <p>I have a table and the selected row at start is the 0th row. I added a MouseEvent to the table to track the users' click. When the click number is 1, I want to put the focus on the selected row only. When the click number is at least 2, I will do another actions, but it is not part of this questions.</p>
  <p>When I run the code, it is not removing the selection from the row, but add it to the current selection.</p>
  <pre><code>            public void mouseClicked(MouseEvent e) {
                  int row = leftTable.rowAtPoint(e.getPoint());
                  if (e.getClickCount() == 1) {
                      leftTable.removeRowSelectionInterval(0, leftTable.getRowCount() - 1);
                      leftTable.setRowSelectionInterval(row, 0);
                  }
                  if (e.getClickCount() &gt;= 2) {
                      System.out.println(&quot;selected: &quot; + row);
                  }
              }
          });
  </code></pre>