src/java.desktop/share/classes/java/awt/Component.java

Print this page

        

*** 1083,1093 **** return; DropTarget old; if ((old = dropTarget) != null) { ! if (peer != null) dropTarget.removeNotify(peer); DropTarget t = dropTarget; dropTarget = null; --- 1083,1093 ---- return; DropTarget old; if ((old = dropTarget) != null) { ! dropTarget.removeNotify(); DropTarget t = dropTarget; dropTarget = null;
*** 1101,1116 **** // if we have a new one, and we have a peer, add it! if ((dropTarget = dt) != null) { try { dropTarget.setComponent(this); ! if (peer != null) dropTarget.addNotify(peer); } catch (IllegalArgumentException iae) { if (old != null) { try { old.setComponent(this); ! if (peer != null) dropTarget.addNotify(peer); } catch (IllegalArgumentException iae1) { // ignore it! } } } --- 1101,1116 ---- // if we have a new one, and we have a peer, add it! if ((dropTarget = dt) != null) { try { dropTarget.setComponent(this); ! dropTarget.addNotify(); } catch (IllegalArgumentException iae) { if (old != null) { try { old.setComponent(this); ! dropTarget.addNotify(); } catch (IllegalArgumentException iae1) { // ignore it! } } }
*** 7005,7015 **** for (int i = 0 ; i < npopups ; i++) { PopupMenu popup = popups.elementAt(i); popup.addNotify(); } ! if (dropTarget != null) dropTarget.addNotify(peer); peerFont = getFont(); if (getContainer() != null && !isAddNotifyComplete) { getContainer().increaseComponentCount(this); --- 7005,7015 ---- for (int i = 0 ; i < npopups ; i++) { PopupMenu popup = popups.elementAt(i); popup.addNotify(); } ! if (dropTarget != null) dropTarget.addNotify(); peerFont = getFont(); if (getContainer() != null && !isAddNotifyComplete) { getContainer().increaseComponentCount(this);
*** 7092,7102 **** if (bufferStrategy instanceof FlipBufferStrategy) { ((FlipBufferStrategy)bufferStrategy).destroyBuffers(); } ! if (dropTarget != null) dropTarget.removeNotify(peer); // Hide peer first to stop system events such as cursor moves. if (visible) { p.setVisible(false); } --- 7092,7102 ---- if (bufferStrategy instanceof FlipBufferStrategy) { ((FlipBufferStrategy)bufferStrategy).destroyBuffers(); } ! if (dropTarget != null) dropTarget.removeNotify(); // Hide peer first to stop system events such as cursor moves. if (visible) { p.setVisible(false); }