void () { Item newItem = createItem(); if (newItem == null) { return; } List<Item> items = new ArrayList<>(doGetItems()); items.add(newItem); setItems(items); final int row = items.size() - 1; myTable.getSelectionModel().setSelectionInterval(row, row); myTable.scrollRectToVisible(myTable.getCellRect(row, 0, true)); if (getTableModel().getColumnInfos()[1].isCellEditable(items.get(row))) { myTable.editCellAt(row, 1); IdeFocusManager.findInstanceByComponent(myContentPane).requestFocus(myTable.getEditorComponent(), true); } updateMessage(-1, null); }