-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.2
-
x86
-
windows_2000
Name: rmT116609 Date: 05/06/2004
FULL PRODUCT VERSION :
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
DropTargetDragEvent.acceptDrag(DnDConstants.ACTION_COPY) doesn't work
This line doesn't achieve anything.
By holding down ctrl the copy icon appears, however the above line should make the copy icon appear without having to hold down ctrl.
Leaving out the above line in the code makes no difference to the outcome.
Users are lead to believe they can't drop, when in fact they can drop by copying.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run code
highlight and drag text
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the icon to look like the copy icon
ACTUAL -
the icon looks like the can't drop icon
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.dnd.*;
import java.util.*;
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame();
JTextField text = new JTextField("Drag Me");
text.setDragEnabled(true);
try {
text.getDropTarget().addDropTargetListener(new DropTargetAdapter() {
public void dragOver(DropTargetDragEvent dtde) {
dtde.acceptDrag(DnDConstants.ACTION_COPY);
}
public void drop(DropTargetDropEvent dtde) {
}
});
}
catch (TooManyListenersException ex) {
System.out.println("Error.... " + ex);
}
frame.getContentPane().add(text);
frame.setSize(500, 500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
(Incident Review ID: 225126)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
DropTargetDragEvent.acceptDrag(DnDConstants.ACTION_COPY) doesn't work
This line doesn't achieve anything.
By holding down ctrl the copy icon appears, however the above line should make the copy icon appear without having to hold down ctrl.
Leaving out the above line in the code makes no difference to the outcome.
Users are lead to believe they can't drop, when in fact they can drop by copying.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run code
highlight and drag text
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
the icon to look like the copy icon
ACTUAL -
the icon looks like the can't drop icon
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.dnd.*;
import java.util.*;
import javax.swing.*;
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame();
JTextField text = new JTextField("Drag Me");
text.setDragEnabled(true);
try {
text.getDropTarget().addDropTargetListener(new DropTargetAdapter() {
public void dragOver(DropTargetDragEvent dtde) {
dtde.acceptDrag(DnDConstants.ACTION_COPY);
}
public void drop(DropTargetDropEvent dtde) {
}
});
}
catch (TooManyListenersException ex) {
System.out.println("Error.... " + ex);
}
frame.getContentPane().add(text);
frame.setSize(500, 500);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
(Incident Review ID: 225126)
======================================================================
- duplicates
-
JDK-4869264 drag & drop action negotiation does not honor the targets supported actions
- Resolved
- relates to
-
JDK-4874092 dragEnter/dragExit methods of DragSourceListener fire without reaching target
- Resolved
-
JDK-5102378 Clarify default drag cursor behavior in startDrag() methods
- Closed
-
JDK-4449146 mouseDragged event still fired while drag and drop
- Closed
-
JDK-4989414 dragExit event not properly triggered
- Closed
-
JDK-4819437 DragSourceListener.dragExit() is called unexpectedly
- Resolved
(1 relates to)