return new Point(0, this.getHeight());
{  int xOffset = UIManager.getInt("Menu.menuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.menuPopupOffsetY");  if (getComponentOrientation().isLeftToRight()) {  point.x = xOffset;  if (screenLoc.x + point.x + popupSize.width > screenBounds.width + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x))  point.x = size.width - xOffset - popupSize.width; } else {  point.x = size.width - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x))  point.x = xOffset; }  point.y = size.height + yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y))  point.y = - yOffset - popupSize.height; } else {  int xOffset = UIManager.getInt("Menu.submenuPopupOffsetX"); int yOffset = UIManager.getInt("Menu.submenuPopupOffsetY");  if (getComponentOrientation().isLeftToRight()) {  point.x = size.width + xOffset; if (screenLoc.x + point.x + popupSize.width >= screenBounds.x + screenBounds.width && screenBounds.width - size.width < 2 * (screenLoc.x - screenBounds.x))  point.x = - xOffset - popupSize.width; } else {  point.x = - xOffset - popupSize.width; if (screenLoc.x + point.x < screenBounds.x && screenBounds.width - size.width > 2 * (screenLoc.x - screenBounds.x))  point.x = size.width + xOffset; }  point.y = yOffset; if (screenLoc.y + point.y + popupSize.height >= screenBounds.y + screenBounds.height && screenBounds.height - size.height < 2 * (screenLoc.y - screenBounds.y)) {   point.y = screenLoc.y - screenBounds.y + size.height - yOffset - popupSize.height;  }      }
  protected Point getPopupMenuOrigin()  {    // if menu in the menu bar    if (isTopLevelMenu())      return new Point(0, this.getHeight());    // if submenu                return new Point(this.getWidth(), 0);  }