public ShapeGraphic createInstance(org.cougaar.core.qos.frame.Frame frame) {
public ShapeGraphic createInstance(org.cougaar.core.qos.frame.Frame frame, FrameModel fmodel) {
    public ShapeGraphic createInstance(org.cougaar.core.qos.frame.Frame frame) {        try {            ShapeContainer cloned = (ShapeContainer) this.clone();            if (frame != null)                cloned.setFrame(frame);            cloned.setPrototype(false);            cloned.shapePrototype = (shapePrototype != null ? ((RectangularShape) shapePrototype.clone()) : null);            cloned.shape = cloned.createShape();            org.cougaar.core.qos.frame.Frame parent = getFrame();            if (cloned.predicate != null && parent != null)                cloned.predicate = new FramePredicate(cloned.predicate, (String) parent.getValue("name"));            cloned.frameChildren = new HashSet();            cloned.shapeLayout = (shapeLayout != null ? shapeLayout.cloneSelf() : null);            cloned.children = new ArrayList();            // clone children            ShapeGraphic child,clonedChild;            for (Iterator ii=children.iterator(); ii.hasNext();) {                child = (ShapeGraphic) ii.next();                clonedChild = child.createInstance(child.frame);                clonedChild.setParent(cloned);                cloned.children.add(clonedChild);            }            cloned.layoutChildren();            cloned.prototypes = new HashMap();            // clone prototypes            String key;            for (Iterator ii=prototypes.keySet().iterator(); ii.hasNext();) {                key = (String) ii.next();                child = (ShapeGraphic) prototypes.get(key);                clonedChild = child.createInstance(child.frame);                clonedChild.setPrototype(true);                clonedChild.setParent(cloned);                cloned.prototypes.put(key, clonedChild);            }            // clone slot change listeners            if (slotListeners.size() > 0) {                cloned.slotListeners = new ArrayList();                for (Iterator ii=slotListeners.iterator(); ii.hasNext();) {                    cloned.addSlotListener(((SlotChangeListener)ii.next()).cloneInstance());                }            }            cloned.validateListeners();            return cloned;        } catch (CloneNotSupportedException ee) {            ee.printStackTrace();        }        return null;    }