}
} else { buildTreeNode(display, sorter.sort(children), tm); }
    private void buildTreeNode(DefaultMutableTreeNode parent,                                 Collection nodes, DefaultTreeModel tm)    {        if (nodes.size() == 0) {            tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG),                     parent, parent.getChildCount());            return;        }        Iterator i = nodes.iterator();        TreeImageDisplay display;        Set children;        parent.removeAllChildren();        while (i.hasNext()) {            display = (TreeImageDisplay) i.next();            tm.insertNodeInto(display, parent, parent.getChildCount());            if (display instanceof TreeImageSet) {                children = display.getChildrenDisplay();                if (children.size() != 0) {                    buildTreeNode(display, sorter.sort(children), tm);                    if (display.containsImages()) {                        expandNode(display);                        tm.reload(display);                    }                 } else {                    tm.insertNodeInto(new DefaultMutableTreeNode(EMPTY_MSG),                         display, display.getChildCount());                }              } else reloadRoot = false;        }     }