if (! changed)
if (invoker instanceof JMenu) {   JMenu menu = (JMenu) invoker; menu.setPopupMenuVisible(changed); } else if (! changed)
  public void menuSelectionChanged(boolean changed)  {    if (! changed)      setVisible(false);  }