public void remove(Layer layer) {
private void remove(Layer layer) {
    public void remove(Layer layer) {        boolean removed = false;                if (children != null) {            for (Iterator i = children.iterator(); i.hasNext(); ) {                Layer child = (Layer)i.next();                if (child == layer) {                    removed = true;                    i.remove();                    break;                }            }        }                if (! removed) {            throw new RuntimeException("Could not find layer to remove");        }    }