--- old/src/share/classes/java/awt/Component.java 2012-12-24 18:06:29.780879400 +0400 +++ new/src/share/classes/java/awt/Component.java 2012-12-24 18:06:29.640479100 +0400 @@ -1671,6 +1671,15 @@ /* 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 setVisible(boolean). @@ -6974,6 +6983,8 @@ } synchronized (getTreeLock()) { + clearLightweightDispatcherOnRemove(this); + if (isFocusOwner() && KeyboardFocusManager.isAutoFocusTransferEnabledFor(this)) { transferFocus(true); }