src/share/classes/java/awt/Component.java
Print this page
@@ -1049,15 +1049,15 @@
// DO NOT INVOKE CLIENT CODE ON THIS THREAD!
final Container getParent_NoClientCode() {
return parent;
}
- // This method is overriden in the Window class to return null,
+ // This method is overridden in the Window class to return null,
// because the parent field of the Window object contains
// the owner of the window, not its parent.
Container getContainer() {
- return getParent();
+ return getParent_NoClientCode();
}
/**
* @deprecated As of JDK version 1.1,
* programs should not directly manipulate peers;
@@ -8195,11 +8195,11 @@
* tree that contains this component.
*/
Container getNativeContainer() {
Container p = parent;
while (p != null && p.peer instanceof LightweightPeer) {
- p = p.getParent_NoClientCode();
+ p = p.getContainer();
}
return p;
}
/**