public void removeCertificate(BurpCertificate burpCertificate){
  @SuppressWarnings("unchecked") Enumeration<DefaultMutableTreeNode> en=rootNode.depthFirstEnumeration();
  while (en.hasMoreElements()) {
    DefaultMutableTreeNode foundNode=en.nextElement();
    if (foundNode.getUserObject() instanceof BurpCertificate) {
      if (foundNode.getUserObject() == burpCertificate) {
        foundNode.removeFromParent();
      }
    }
  }
}

public void removeCertificate ( BurpCertificate burpCertificate ) { @ SuppressWarnings ( "unchecked" ) Enumeration < DefaultMutableTreeNode > en = rootNode . depthFirstEnumeration ( ) ; while ( en . hasMoreElements ( ) ) { DefaultMutableTreeNode foundNode = en . nextElement ( ) ; if ( foundNode . getUserObject ( ) instanceof BurpCertificate ) { if ( foundNode . getUserObject ( ) == burpCertificate ) { foundNode . removeFromParent ( ) ; } } } }
deletes a certificate from the store . it can be placed anywhere in the tree .
