src/share/classes/java/awt/Component.java
Print this page
*** 1669,1678 ****
--- 1669,1687 ----
void clearCurrentFocusCycleRootOnHide() {
/* do nothing */
}
+ /*
+ * Delete references from LightweithDispatcher of a heavyweight parent
+ */
+ void clearLightweightDispatcherOnRemove(Component removedComponent) {
+ if (parent != null) {
+ parent.clearLightweightDispatcherOnRemove(removedComponent);
+ }
+ }
+
/**
* @deprecated As of JDK version 1.1,
* replaced by <code>setVisible(boolean)</code>.
*/
@Deprecated
*** 6972,6981 ****
--- 6981,6992 ----
KeyboardFocusManager.getCurrentKeyboardFocusManager().
setGlobalPermanentFocusOwner(null);
}
synchronized (getTreeLock()) {
+ clearLightweightDispatcherOnRemove(this);
+
if (isFocusOwner() && KeyboardFocusManager.isAutoFocusTransferEnabledFor(this)) {
transferFocus(true);
}
if (getContainer() != null && isAddNotifyComplete) {