subElements[i] = (MenuElement) getMenu(i);
{ menu = getMenu(i); if (menu != null) { subElements[j++] = (MenuElement) menu; } else doResize = true; }
  public MenuElement[] getSubElements()  {    MenuElement[] subElements = new MenuElement[getComponentCount()];    for (int i = 0; i < getComponentCount(); i++)      subElements[i] = (MenuElement) getMenu(i);    return subElements;  }