void (AnActionButton button) { stopEditing(); TodoFilter filter = new TodoFilter(); FilterDialog dialog = new FilterDialog(myPanel, filter, -1, myFilters, myPatterns); if (dialog.showAndGet()) { myFilters.add(filter); int index = myFilters.size() - 1; myFiltersModel.fireTableRowsInserted(index, index); myFiltersTable.getSelectionModel().setSelectionInterval(index, index); myFiltersTable.scrollRectToVisible(myFiltersTable.getCellRect(index, 0, true)); } }