--- /home/cpdev/src/classpath/javax/swing/plaf/basic/BasicMenuUI.java	2005-07-12 05:32:51.000000000 +0000
+++ javax/swing/plaf/basic/BasicMenuUI.java	2005-06-30 05:35:18.000000000 +0000
@@ -1,5 +1,5 @@
 /* BasicMenuUI.java
-   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -292,39 +292,19 @@
       manager.processMouseEvent(e);
     }
 
-    private boolean popupVisible()
-    {
-      JMenuBar mb = (JMenuBar) ((JMenu)menuItem).getParent();
-      // check if mb.isSelected because if no menus are selected
-      // we don't have to look through the list for popup menus
-      if (!mb.isSelected())
-        return false;
-      for (int i=0;i<mb.getMenuCount();i++)
-        if (((JMenu)mb.getComponent(i)).isPopupMenuVisible())
-          return true;
-      return false;
-    }
-
     public void mouseEntered(MouseEvent e)
     {
       /* When mouse enters menu item, it should be considered selected
 
        if (i) if this menu is a submenu in some other menu
-          (ii) or if this menu is in a menu bar and some other menu in a 
-          menu bar was just selected and has its popup menu visible. 
-               (If nothing was selected, menu should be pressed before
+          (ii) or if this menu is in a menu bar and some other menu in a menu bar was just
+               selected. (If nothing was selected, menu should be pressed before
                it will be selected)
       */
       JMenu menu = (JMenu) menuItem;
-
-      // NOTE: the following if used to require !menu.isArmed but I could find
-      // no reason for this and it was preventing some JDK-compatible behaviour.
-      // Specifically, if a menu is selected but its popup menu not visible,
-      // and then another menu is selected whose popup menu IS visible, when
-      // the mouse is moved over the first menu, its popup menu should become
-      // visible.
-
-      if (! menu.isTopLevelMenu() || popupVisible())
+      if (! menu.isTopLevelMenu()
+          || (menu.isTopLevelMenu()
+          && (((JMenuBar) menu.getParent()).isSelected() && ! menu.isArmed())))
         {
 	  // set new selection and forward this event to MenuSelectionManager
 	  MenuSelectionManager manager = MenuSelectionManager.defaultManager();
@@ -439,15 +419,12 @@
       *
       * @param e The PropertyChangeEvent.
       */
-    public void propertyChange(PropertyChangeEvent e)
+    public void propertyChange(PropertyChangeEvent evt)
     {
     }
   }
 
-  /**
-   * @deprecated
-   */
-  public class ChangeHandler implements ChangeListener
+  protected class ChangeHandler implements ChangeListener
   {
     public void stateChanged(ChangeEvent e)
     {
