void (AnActionButton button) { final ListWrappingTableModel tableModel = table.getModel(); tableModel.addRow(); EventQueue.invokeLater(() -> { final int lastRowIndex = tableModel.getRowCount() - 1; editTableCell(table, lastRowIndex, 0); }); }