--- /home/cpdev/src/classpath/javax/swing/SwingUtilities.java	2005-07-02 21:04:02.000000000 +0000
+++ javax/swing/SwingUtilities.java	2005-06-30 05:35:14.000000000 +0000
@@ -352,25 +352,6 @@
   }
 
   /**
-   * Returns the first ancestor of <code>comp</code> that is a {@link Window}
-   * or <code>null</code> if <code>comp</code> is not contained in a
-   * {@link Window}.
-   *
-   * This is equivalent to calling
-   * <code>getAncestorOfClass(Window, comp)</code> or
-   * <code>windowForComponent(comp)</code>.
-   *
-   * @param comp the component for which we are searching the ancestor Window
-   *
-   * @return the first ancestor Window of <code>comp</code> or
-   *     <code>null</code> if <code>comp</code> is not contained in a Window
-   */
-  public static Window getWindowAncestor(Component comp)
-  {
-    return (Window) getAncestorOfClass(Window.class, comp);
-  }
-
-  /**
    * Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
    *
    * @param comp The component to search for an ancestor window 
@@ -534,11 +515,8 @@
     if (destination == null)
       destination = getRoot(source);
 
-    if (source.isShowing() && destination.isShowing())
-      {
-        convertPointToScreen(pt, source);
-        convertPointFromScreen(pt, destination);
-      }
+    convertPointToScreen(pt, source);
+    convertPointFromScreen(pt, destination);
 
     return pt;
   }
@@ -848,14 +826,8 @@
       }
     else
       {
-        int fromIndex = 0;
         textR.width = fm.stringWidth(text);
         textR.height = fm.getHeight(); 
-        while (text.indexOf('\n', fromIndex) != -1)
-          {
-            textR.height += fm.getHeight();
-            fromIndex = text.indexOf('\n', fromIndex) + 1;
-          }
       }
 
     // Work out the position of text and icon, assuming the top-left coord
@@ -1134,13 +1106,9 @@
       component.setActionMap(uiActionMap);
     else
       {
-        ActionMap parent = child.getParent();
-        while(parent != null)
-          {
-            child = parent;
-            parent = child.getParent();
-          }
-
+        while(child.getParent() != null
+              && !(child.getParent() instanceof ActionMapUIResource))
+          child = child.getParent();
         if (child != null)
           child.setParent(uiActionMap);
       }
@@ -1351,45 +1319,4 @@
            && b.x >= a.x && b.x + b.width <= a.x + a.width && b.y >= a.y
            && b.y + b.height <= a.y + a.height;
   }
-
-  /**
-   * Returns the InputMap that is provided by the ComponentUI of
-   * <code>component</code> for the specified condition.
-   *
-   * @param component the component for which the InputMap is returned
-   * @param cond the condition that specifies which of the three input
-   *     maps should be returned, may be
-   *     {@link JComponent#WHEN_IN_FOCUSED_WINDOW},
-   *     {@link JComponent#WHEN_FOCUSED} or
-   *     {@link JComponent#WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
-   *
-   * @return
-   */
-  public static InputMap getUIInputMap(JComponent component, int cond)
-  {
-    if (UIManager.getUI(component) != null)
-      // we assume here that the UI class sets the parent of the component's
-      // InputMap, which is the correct behaviour. If it's not, then
-      // this can be considered a bug
-      return component.getInputMap(cond).getParent();
-    else
-      return null;
-  }
-
-  /**
-   * Returns the ActionMap that is provided by the ComponentUI of
-   * <code>component</code>.
-   *
-   * @param component the component for which the ActionMap is returned
-   */
-  public static ActionMap getUIActionMap(JComponent component)
-  {
-    if (UIManager.getUI(component) != null)
-      // we assume here that the UI class sets the parent of the component's
-      // ActionMap, which is the correct behaviour. If it's not, then
-      // this can be considered a bug
-      return component.getActionMap().getParent();
-    else
-      return null;
-  }
 }
