Problem .. removing the last row is throwing array out of index exception in the GUI scope!   solution ... make the removing action inside invokeLater block , this will make the GUI listeners work correctly    final DefaultTableModel model=   ((DefaultTableModel)jTable.getModel());                       SwingUtilities.invokeLater(new Runnable() {                   @Override                  public void run() {                       model.removeRow(_row);                  }                  } );