void (@NotNull JTable table) { if (table.isEditing()) { final TableCellEditor cellEditor = table.getCellEditor(); if (cellEditor != null) { cellEditor.stopCellEditing(); } int row = table.getSelectedRow(); int column = table.getSelectedColumn(); if (row >= 0 && column >= 0) { TableCellEditor editor = table.getCellEditor(row, column); if (editor != null) { editor.stopCellEditing(); //Object value = editor.getCellEditorValue(); // //table.setValueAt(value, row, column); } } } }