--- /home/cpdev/src/classpath/javax/swing/JMenu.java	2005-07-12 17:32:36.000000000 +0000
+++ javax/swing/JMenu.java	2005-06-30 05:35:09.000000000 +0000
@@ -328,57 +328,50 @@
    */
   public boolean isSelected()
   {
-    return super.isSelected();
+    return super.isArmed();
   }
 
   /**
-   * A helper method to handle setSelected calls from both mouse events and 
-   * direct calls to setSelected.  Direct calls shouldn't expand the popup
-   * menu and should select the JMenu even if it is disabled.  Mouse events
-   * only select the JMenu if it is enabled and should expand the popup menu
-   * associated with this JMenu.
-   * @param selected whether or not the JMenu was selected
-   * @param menuEnabled whether or not selecting the menu is "enabled".  This
-   * is always true for direct calls, and is set to isEnabled() for mouse 
-   * based calls.
-   * @param showMenu whether or not to show the popup menu
-   */
-  private void setSelectedHelper(boolean selected, boolean menuEnabled, boolean showMenu)
-  {
-    // If menu is selected and enabled, activates the menu and 
-    // displays associated popup.	
-    if (selected && menuEnabled)
+   * Changes this menu selected state if selected is true and false otherwise
+   * This method fires menuEvents to menu's registered listeners.
+   *
+   * @param selected true if the menu should be selected and false otherwise
+   */
+  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 (isShowing())
+	// 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 (showMenu)
-              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);
-                }
+
+	    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);
@@ -389,17 +382,6 @@
   }
 
   /**
-   * Changes this menu selected state if selected is true and false otherwise
-   * This method fires menuEvents to menu's registered listeners.
-   *
-   * @param selected true if the menu should be selected and false otherwise
-   */
-  public void setSelected(boolean selected)
-  {
-    setSelectedHelper(selected, true, false); 
-  }
-
-  /**
    * Checks if PopupMenu associated with this menu is visible
    *
    * @return true if the popup associated with this menu is currently visible
@@ -727,7 +709,7 @@
   {
     // if this menu selection is true, then activate this menu and 
     // display popup associated with this menu
-    setSelectedHelper(changed, isEnabled(), true);
+    setSelected(changed);
   }
 
   /**
@@ -815,8 +797,6 @@
   protected class AccessibleJMenu extends AccessibleJMenuItem
     implements AccessibleSelection
   {
-    private static final long serialVersionUID = -8131864021059524309L;
-
     protected AccessibleJMenu()
     {
     }
@@ -911,5 +891,4 @@
       // FIXME: Need to implement
     }
   }
-
 }
