src/share/classes/java/awt/Component.java
Print this page
*** 1049,1063 ****
// 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,
// because the parent field of the Window object contains
// the owner of the window, not its parent.
Container getContainer() {
! return getParent();
}
/**
* @deprecated As of JDK version 1.1,
* programs should not directly manipulate peers;
--- 1049,1063 ----
// DO NOT INVOKE CLIENT CODE ON THIS THREAD!
final Container getParent_NoClientCode() {
return parent;
}
! // 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_NoClientCode();
}
/**
* @deprecated As of JDK version 1.1,
* programs should not directly manipulate peers;
*** 8195,8205 ****
* tree that contains this component.
*/
Container getNativeContainer() {
Container p = parent;
while (p != null && p.peer instanceof LightweightPeer) {
! p = p.getParent_NoClientCode();
}
return p;
}
/**
--- 8195,8205 ----
* tree that contains this component.
*/
Container getNativeContainer() {
Container p = parent;
while (p != null && p.peer instanceof LightweightPeer) {
! p = p.getContainer();
}
return p;
}
/**