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

Print this page

        

@@ -1083,11 +1083,11 @@
             return;
 
         DropTarget old;
 
         if ((old = dropTarget) != null) {
-            if (peer != null) dropTarget.removeNotify(peer);
+            dropTarget.removeNotify();
 
             DropTarget t = dropTarget;
 
             dropTarget = null;
 

@@ -1101,16 +1101,16 @@
         // 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);
+                dropTarget.addNotify();
             } catch (IllegalArgumentException iae) {
                 if (old != null) {
                     try {
                         old.setComponent(this);
-                        if (peer != null) dropTarget.addNotify(peer);
+                        dropTarget.addNotify();
                     } catch (IllegalArgumentException iae1) {
                         // ignore it!
                     }
                 }
             }

@@ -7005,11 +7005,11 @@
             for (int i = 0 ; i < npopups ; i++) {
                 PopupMenu popup = popups.elementAt(i);
                 popup.addNotify();
             }
 
-            if (dropTarget != null) dropTarget.addNotify(peer);
+            if (dropTarget != null) dropTarget.addNotify();
 
             peerFont = getFont();
 
             if (getContainer() != null && !isAddNotifyComplete) {
                 getContainer().increaseComponentCount(this);

@@ -7092,11 +7092,11 @@
 
                 if (bufferStrategy instanceof FlipBufferStrategy) {
                     ((FlipBufferStrategy)bufferStrategy).destroyBuffers();
                 }
 
-                if (dropTarget != null) dropTarget.removeNotify(peer);
+                if (dropTarget != null) dropTarget.removeNotify();
 
                 // Hide peer first to stop system events such as cursor moves.
                 if (visible) {
                     p.setVisible(false);
                 }