void (int selectedRow, JBTable table) { AbstractTableModel model = (AbstractTableModel)table.getModel(); model.fireTableRowsInserted(selectedRow, selectedRow); table.setRowSelectionInterval(selectedRow, selectedRow); TableUtil.editCellAt(table, selectedRow, 0); Component editorComp = table.getEditorComponent(); if (editorComp != null) { IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(editorComp, true)); } }