if (parent == null) { if (this instanceof MenuBar) { MenuBar menuBar = (MenuBar) this; if (menuBar.frame != null) retVal = menuBar.frame.postEvent(event); } } else
if (parent != null)
  postEvent(Event event)  {    boolean retVal = false;    MenuContainer parent = getParent();    if (parent == null)      {        if (this instanceof MenuBar)          {            MenuBar menuBar = (MenuBar) this;            if (menuBar.frame != null)              retVal = menuBar.frame.postEvent(event);          }      }    else      retVal = parent.postEvent(event);    return retVal;  }