void (@NotNull JTree tree, @NotNull Component component, int row) { TreePath path = tree.getPathForRow(row); Color background = path == null ? null : getBackground(tree, path, row, tree.isRowSelected(row)); setBackground(tree, component, background, true); }