@Override public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { DefaultTreeCellRenderer cellRenderer = (JBDefaultTreeCellRenderer) super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); tree.putClientProperty(TREE_TABLE_TREE_KEY, new JBTable()); // Avoid setting TreeUnfocusedSelectionBackground // Set icon Issue topIssue = ((ScanTreeNode) value).getTopIssue(); cellRenderer.setIcon(IconUtils.load(StringUtils.lowerCase(topIssue.getSeverity().toString()))); return cellRenderer; }