return getComponents().length;
return getMenuComponentCount();
  public int getItemCount()  {    // returns the number of items on     // the menu, including separators.    return getComponents().length;  }