DefaultMutableTreeNode addTreeTags(DefaultMutableTreeNode NodeAddTo, Hashtable<String, IDTitle> PathTags) {
        String[] TagIDs;
        DefaultMutableTreeNode TempTreeNode;
        IDTitle TempIDTitle;
        // Gets a list of tags tagged with this tag (or all if root node)
        TempIDTitle = (IDTitle) NodeAddTo.getUserObject();
        if (TempIDTitle.getID().equals("-1")) {
            TagIDs = mainImageDB.getAllTagIDs();
        } else {
            TagIDs = mainImageDB.getTagIDsFromTagID(TempIDTitle.getID());
        }
        // For all of those tags, add them to the node as branches and recurse
        if (TagIDs != null) {
            for (int i = 0; i < TagIDs.length; i++) //for (int i=TagIDs.length-1; i>=0; i--)//Reverse add
            {
                if (PathTags.containsKey(TagIDs[i]) == false) {
                    TempIDTitle = new IDTitle(TagIDs[i], mainImageDB.getTagTitleFromTagID(TagIDs[i]));
                    TempTreeNode = new DefaultMutableTreeNode(TempIDTitle);
                    PathTags.put(TagIDs[i], TempIDTitle);
                    TempTreeNode = addTreeTags(TempTreeNode, PathTags);
                    PathTags.remove(TagIDs[i]);
                    NodeAddTo.add(TempTreeNode);
                }
            }
        }
        return NodeAddTo;
    }