if (e instanceof ContainerChildRemovedEvent) {
updateTree(display.getRootContainer());  /*if (e instanceof ContainerChildRemovedEvent) {
        public void run() {            if (e instanceof ContainerChildRemovedEvent) {                //ContainerChildRemovedEvent ee = (ContainerChildRemovedEvent)e;                //ShapeContainer c = ee.getContainer();                //ShapeGraphic gr = ee.getChild();            } else if (e instanceof ContainerChildAddedEvent) {                ContainerChildAddedEvent ee = (ContainerChildAddedEvent) e;                ShapeContainer container = ee.getContainer();                ShapeGraphic child = ee.getChild();                DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) containerToNodeMap.get(container);                DefaultMutableTreeNode childNode  = (DefaultMutableTreeNode) containerToNodeMap.get(child);                // if the parent is null, backtrack to the parent that we know about an rebuild the tree from there                if (parentNode == null) {                    ShapeContainer prev=null, c = container.getParent();                    // go up untill we find the container that we know                    while (c != null && containerToNodeMap.get(c) == null)                       c = c.getParent();                    if (c == null)                        throw new NullPointerException();  // this should definitely not happen                    DefaultMutableTreeNode ancestorNode = (DefaultMutableTreeNode) containerToNodeMap.get(c);                    buildTree((ShapeGraphicNode) ancestorNode.getParent(), c);                    parentNode = createNode(container);                    if (parentNode == null) throw new NullPointerException();                }                if (childNode == null) {                    childNode = createNode(child);                    if (child.hasFrame())                        childNode.add(createNode(child.getFrame()));                }                treeModel.insertNodeInto(childNode, parentNode, 0);            }  else if (e instanceof AddedFramesEvent) {                // process added frames                //AddedFramesEvent ee = (AddedFramesEvent)e;               // if (ee.getAddedDataFrames() != null)                //    updateTree(display.getRootContainer());            }        }