code: public void addMenuItem(Runnable item) {
          items.add(item);
          if (item instanceof Menu) {
          	((Menu) item).parent = this;
          }
      }
docs: Adds the menu item. A (sub) menu is also a menu item
  
  @param item the menu item