--- /home/cpdev/src/classpath/javax/swing/JLayeredPane.java	2005-07-02 21:04:01.000000000 +0000
+++ javax/swing/JLayeredPane.java	2005-06-30 05:35:09.000000000 +0000
@@ -124,60 +124,9 @@
    */
   public int getLayer(Component c)
   {
-    Component myComp = c;
-    while(! componentToLayer.containsKey(myComp))
-      {
-	myComp = myComp.getParent();
-	if (myComp == null)
-	  break;
-      }
-    if (myComp == null)
-      throw new IllegalArgumentException
-	("component is not in this JLayeredPane");
-    Integer layerObj = (Integer) componentToLayer.get(myComp);
-    return layerObj.intValue();
-  }
-
-  /**
-   * Looks up the layer of <code>comp</code> in the component's nearest
-   * JLayeredPane ancestor. If <code>comp</code> is not contained
-   * in a JLayeredPane, the value 0 (default layer) is returned.
-   *
-   * @param comp the component for which the layer is looked up
-   *
-   * @return the layer of <code>comp</code> in its nearest JLayeredPane
-   *     ancestor
-   */
-  public static int getLayer(JComponent comp)
-  {
-    JLayeredPane lp = (JLayeredPane) SwingUtilities.getAncestorOfClass
-      (JLayeredPane.class, comp);
-    if (lp == null)
-      return 0;
-    else
-      // The cast here forces the call to the instance method getLayer()
-      // instead of the static method (this would lead to infinite
-      // recursion).
-      return lp.getLayer((Component) comp);
-  }
-
-  /**
-   * Returns the first JLayeredPane that contains the Component
-   * <code>comp</code> or <code>null</code> if <code>comp</code> is
-   * not contained in a JLayeredPane.
-   *
-   * @param comp the component for which we are searching the JLayeredPane
-   *     ancestor
-   *
-   * @return the first JLayeredPane that contains the Component
-   *     <code>comp</code> or <code>null</code> if <code>comp</code> is
-   *     not contained in a JLayeredPane
-   */
-  public static JLayeredPane getLayeredPaneAbove(Component comp)
-  {
-    JLayeredPane lp = (JLayeredPane) SwingUtilities.getAncestorOfClass
-      (JLayeredPane.class, comp);
-    return lp;
+    if (! componentToLayer.containsKey (c))
+	    throw new IllegalArgumentException ();
+    return ((Integer) componentToLayer.get(c)).intValue();
   }
 
   /**
@@ -608,15 +557,4 @@
     revalidate();
     repaint();
   }     
-
-  /**
-   * Sets the layer property for a JComponent.
-   *
-   * @param component the component for which to set the layer
-   * @param layer the layer property to set
-   */
-  public static void putLayer(JComponent component, int layer)
-  {
-    getLayeredPaneAbove(component).setLayer(component, layer);
-  }
 }
