if (this.isShowing())
if (isShowing())
  public void setSelected(boolean selected)  {    // if this menu selection is true, then activate this menu and     // display popup associated with this menu	    if (selected)      {    super.setArmed(true);	super.setSelected(true);	// FIXME: The popup menu should be shown on the screen after certain	// number of seconds pass. The 'delay' property of this menu indicates	// this amount of seconds. 'delay' property is 0 by default.	if (this.isShowing())	  {    fireMenuSelected();	    int x = 0;	    int y = 0;	    if (menuLocation == null)	      {		// Calculate correct position of the popup. Note that location of the popup 		// passed to show() should be relative to the popup's invoker		if (isTopLevelMenu())		  y = this.getHeight();		else		  x = this.getWidth();		getPopupMenu().show(this, x, y);	      }	    else	      getPopupMenu().show(this, menuLocation.x, menuLocation.y);	  }      }    else      {	super.setSelected(false);	super.setArmed(false);	fireMenuDeselected();	popupMenu.setVisible(false);      }  }