public void addTagToTree(String newTagID, String newTag) {
        boolean addToRoot = false;
        DefaultTreeModel model;
        DefaultMutableTreeNode nodeAddTo = null;
        DefaultMutableTreeNode nodeToAdd = null;
        IDTitle nodeAddToObject = null;
        // Find the currently selected node in the tree
        if (this.getSelectionPath() == null) {
            addToRoot = true;
        } else {
            nodeAddTo = (DefaultMutableTreeNode) this.getLastSelectedPathComponent();
            // If root node selected then add to root node
            nodeAddToObject = (IDTitle) nodeAddTo.getUserObject();
            if (nodeAddToObject.getID().equals("-1")) {
                addToRoot = true;
            }
            if (addToRoot == false) {
                mainImageDB.tagTag(newTagID, nodeAddToObject.getID());
            }
        }
        if (addToRoot == true) {
            nodeAddTo = (DefaultMutableTreeNode) this.getModel().getRoot();
        }
        nodeToAdd = new DefaultMutableTreeNode(new IDTitle(newTagID, newTag));
        model = (DefaultTreeModel) this.getModel();
        model.insertNodeInto(nodeToAdd, nodeAddTo, nodeAddTo.getChildCount());
        //model.nodeStructureChanged(nodeAddTo);
        this.repaint();
    }