--- a/jdk/src/share/classes/java/awt/Component.java Tue Apr 30 13:24:14 2013 +0400
+++ b/jdk/src/share/classes/java/awt/Component.java Tue Apr 30 17:27:48 2013 +0400
@@ -1051,11 +1051,11 @@
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();
}
/**
@@ -8194,10 +8194,10 @@
* Fetches the native container somewhere higher up in the component
* tree that contains this component.
*/
- Container getNativeContainer() {
- Container p = parent;
+ final Container getNativeContainer() {
+ Container p = getContainer();
while (p != null && p.peer instanceof LightweightPeer) {
- p = p.getParent_NoClientCode();
+ p = p.getContainer();
}
return p;
}