void () { final TableColumnModel columnModel = getColumnModel(); TableColumn classesColumn = columnModel.getColumn(DiffViewTableModel.CLASSNAME_COLUMN_INDEX); TableColumn countColumn = columnModel.getColumn(DiffViewTableModel.COUNT_COLUMN_INDEX); TableColumn diffColumn = columnModel.getColumn(DiffViewTableModel.DIFF_COLUMN_INDEX); setAutoResizeMode(AUTO_RESIZE_SUBSEQUENT_COLUMNS); classesColumn.setPreferredWidth(JBUIScale.scale(CLASSES_COLUMN_PREFERRED_WIDTH)); countColumn.setMinWidth(JBUIScale.scale(COUNT_COLUMN_MIN_WIDTH)); diffColumn.setMinWidth(JBUIScale.scale(DIFF_COLUMN_MIN_WIDTH)); TableRowSorter<DiffViewTableModel> sorter = new TableRowSorter<>(myModel); sorter.setRowFilter(new RowFilter<>() { @Override public boolean include(Entry<? extends DiffViewTableModel, ? extends Integer> entry) { int ix = entry.getIdentifier(); TypeInfo ref = getTypeInfoAt(ix); DiffValue diff = myCounts.getOrDefault(ref, UNKNOWN_VALUE); boolean isFilteringOptionsRefused = myOnlyWithDiff && diff.diff() == 0 || myOnlyWithInstances && !diff.hasInstance() || myOnlyTracked && myParent.getStrategy(ref) == null; return !(isFilteringOptionsRefused) && myMatcher.matches(ref.name()); } }); List<RowSorter.SortKey> myDefaultSortingKeys = getTableSortingKeys(); sorter.setSortKeys(myDefaultSortingKeys); setRowSorter(sorter); }