m_CurrentNode = node;
  public Object readBeanInstance(Element node) throws Exception {    Object          result;    Vector          children;    Element         child;    String          name;    int             i;    int             x;    int             y;    int             id;    Object          bean;    BeanVisual      visual;    BeanInstance    beaninst;    Point           coords;    // for debugging only    if (DEBUG)       trace(new Throwable(), node.getAttribute(ATT_NAME));        result = null;    children = XMLDocument.getChildTags(node);    id       = -1;    x        = 0;    y        = 0;    bean     = null;    for (i = 0; i < children.size(); i++) {      child = (Element) children.get(i);      name = child.getAttribute(ATT_NAME);      if (name.equals(VAL_ID))        id = readIntFromXML(child);      else if (name.equals(VAL_X))        x = readIntFromXML(child);      else if (name.equals(VAL_Y))        y = readIntFromXML(child);      else if (name.equals(VAL_BEAN))        bean = invokeReadFromXML(child);      else        System.out.println("WARNING: '" + name            + "' is not a recognized name for " + node.getAttribute(ATT_NAME) + "!");    }        result   = new BeanInstance(m_BeanLayout, bean, x, y);    beaninst = (BeanInstance) result;        // fix coordinates    coords = new Point();    coords.setLocation(beaninst.getX(), beaninst.getY());    coords = fixCoordinates(beaninst, coords);    beaninst.setX((int) coords.getX());    beaninst.setY((int) coords.getY());    // set parent of BeanVisual    if (beaninst.getBean() instanceof weka.gui.beans.Visible) {      visual = ((Visible) beaninst.getBean()).getVisual();      if (visual.getParent() == null) {        ((JPanel) beaninst.getBean()).add(visual);      }    }        // no IDs -> get next null position    if (id == -1) {      for (i = 0; i < m_BeanInstances.size(); i++) {        if (m_BeanInstances.get(i) == null) {          id = ((Integer) m_BeanInstancesID.get(i)).intValue();          break;        }      }    }    // get position for id    i = m_BeanInstancesID.indexOf(new Integer(id));    // keep track of the BeanInstances for reading the connections later on    m_BeanInstances.set(i, result);    // no current MetaBean    m_CurrentMetaBean = null;        return result;  }