public void cancelEditing(){
  TableCellEditor editor=getCellEditor();
  if (editor != null) {
    editor.cancelCellEditing();
  }
}

public void cancelEditing ( ) { TableCellEditor editor = getCellEditor ( ) ; if ( editor != null ) { editor . cancelCellEditing ( ) ; } }
cancels on - going cell editing
