title: row selection not moving with row moves in JTable
body: <p>I have following code:</p>
  
  <pre><code>import java.awt.BorderLayout;
  import java.awt.Dimension;
  import java.util.Vector;
  import javax.swing.JFrame;
  import javax.swing.JScrollPane;
  import javax.swing.JTable;
  import javax.swing.SwingUtilities;
  import javax.swing.UIManager;
  import javax.swing.plaf.nimbus.NimbusLookAndFeel;
  import javax.swing.table.DefaultTableModel;
  
  public class NewClass1 extends JFrame {
      private JTable table;
      private JScrollPane scrollPane;
      private DefaultTableModel defaultTableModel;
  
      public NewClass1() {
          setLocationByPlatform(true);
          setLayout(new BorderLayout());
          setPreferredSize(new Dimension(600, 400));
          setTitle("Table Issues");
          setDefaultCloseOperation(EXIT_ON_CLOSE);
  
          createTableModel();
          table = new JTable(defaultTableModel);
  
          scrollPane = new JScrollPane(table);
  
          getContentPane().add(scrollPane, BorderLayout.CENTER);
  
          pack();
      }
  
      private void createTableModel() {
          Vector cols = new Vector();
          cols.add("A");
  
          Vector rows = new Vector();
          for (int i = 0; i &lt; 50; i++) {
              Vector row = new Vector();
              row.add((i + 1) + "");
              rows.add(row);
          }
  
          defaultTableModel = new DefaultTableModel(rows, cols) {
              Class[] types = new Class[]{
                  String.class
              };
  
              @Override
              public Class getColumnClass(int columnIndex) {
                  return types[columnIndex];
              }
  
              @Override
              public boolean isCellEditable(int row, int column) {
                  return false;
              }
          };
      }
  
      public static void main(String[] args) {
          try {
              UIManager.setLookAndFeel(new NimbusLookAndFeel());
          } catch (Exception e) {
          }
  
          final NewClass1 nc = new NewClass1();
          SwingUtilities.invokeLater(new Runnable() {
              public void run() {
                  nc.setVisible(true);
              }
          });
  
          while (true) {
              SwingUtilities.invokeLater(new Runnable() {
                  public void run() {
                      int row = (int) (Math.random() * 50);
                      int move = (int) (Math.random() * 50);
  
                      nc.defaultTableModel.moveRow(row, row, move);
                  }
              });
              try{
                  Thread.sleep(1000);
              }catch(Exception e){
              }
          }
      }
  }
  </code></pre>
  
  <p>Please run the above code and select row.</p>
  
  <p>My problem is with row movement, row selection is not moving. It is staying at fixed position. Suppose I selected row with column value 25, selected row must be of column value 25 after row movements.</p>
  
  <p>Please help me on this.</p>
  
  <p>My real problem is, user will select row and clicks menu to perform action, meanwhile other threads may have moved rows, and performed action will be on other row than actual one.</p>