code: @Override
      public Component getTreeCellRendererComponent(
              JTree tree,
              Object value,
              boolean sel,
              boolean expanded,
              boolean leaf,
              int row,
              boolean hasFocus) {
  
          super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
  
          if (value instanceof AlertNode) {
              AlertNode alertNode = (AlertNode) value;
              if (alertNode.isRoot()) {
                  if (expanded) {
                      this.setIcon(FOLDER_OPEN_ICON);
                  } else {
                      this.setIcon(FOLDER_CLOSED_ICON);
                  }
              } else if (alertNode.getParent().isRoot()) {
                  // Add the alert flag icon
                  Alert alert = alertNode.getUserObject();
                  this.setIcon(alert.getIcon());
              } else {
                  this.setIcon(LEAF_ICON);
              }
          }
          return this;
      }
docs: Sets the relevant tree icons.