-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta
-
generic, x86, sparc
-
generic, solaris_2.6, windows_nt
-
Verified
Drag and drop operation from JList to JTextField raising exceptions.
In solaris, it is not at all copying the text of selected item of JList.
In windows, it is copying but still throwing exceptions. But it is copying only after requesting focus for the JTextField before doing drag and drop operation.
Find attached test case with the bug report.
To Reproduce the bug :
1) Compile and run the attached Java File.
2) Select any item in the JList. Drag it to JTextField beside it. You'll be getting exceptions on console. No text copied into the textfield.
3) Rerun it again, first select the JTextField, then do step 2. It copies the text into the textfield, but still raises exception.
-----------------------------------------------
stack trace found on Windows:
Exception occurred during event dispatching:
java.awt.dnd.InvalidDnDOperationException: The operation requested cannot be per
formed by the DnD system since it is not in the appropriate state
at sun.awt.dnd.SunDropTargetContextPeer.setCurrentJVMLocalSourceTransfer
able(SunDropTargetContextPeer.java:114)
at sun.awt.windows.WDragSourceContextPeer.startDrag(WDragSourceContextPe
er.java:82)
at java.awt.dnd.DragSource.startDrag(DragSource.java:267)
at java.awt.dnd.DragSource.startDrag(DragSource.java:366)
at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:187)
at javax.swing.TransferHandler$DragHandler.dragGestureRecognized(Transfe
rHandler.java:601)
at java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(DragGest
ureRecognizer.java:334)
at javax.swing.TransferHandler$SwingDragGestureRecognizer.gestured(Trans
ferHandler.java:653)
at javax.swing.TransferHandler.exportAsDrag(TransferHandler.java:130)
at javax.swing.plaf.basic.BasicListUI$MouseInputHandler.mouseDragged(Bas
icListUI.java:851)
at java.awt.Component.processMouseMotionEvent(Component.java:4183)
In solaris, it is not at all copying the text of selected item of JList.
In windows, it is copying but still throwing exceptions. But it is copying only after requesting focus for the JTextField before doing drag and drop operation.
Find attached test case with the bug report.
To Reproduce the bug :
1) Compile and run the attached Java File.
2) Select any item in the JList. Drag it to JTextField beside it. You'll be getting exceptions on console. No text copied into the textfield.
3) Rerun it again, first select the JTextField, then do step 2. It copies the text into the textfield, but still raises exception.
-----------------------------------------------
stack trace found on Windows:
Exception occurred during event dispatching:
java.awt.dnd.InvalidDnDOperationException: The operation requested cannot be per
formed by the DnD system since it is not in the appropriate state
at sun.awt.dnd.SunDropTargetContextPeer.setCurrentJVMLocalSourceTransfer
able(SunDropTargetContextPeer.java:114)
at sun.awt.windows.WDragSourceContextPeer.startDrag(WDragSourceContextPe
er.java:82)
at java.awt.dnd.DragSource.startDrag(DragSource.java:267)
at java.awt.dnd.DragSource.startDrag(DragSource.java:366)
at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:187)
at javax.swing.TransferHandler$DragHandler.dragGestureRecognized(Transfe
rHandler.java:601)
at java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(DragGest
ureRecognizer.java:334)
at javax.swing.TransferHandler$SwingDragGestureRecognizer.gestured(Trans
ferHandler.java:653)
at javax.swing.TransferHandler.exportAsDrag(TransferHandler.java:130)
at javax.swing.plaf.basic.BasicListUI$MouseInputHandler.mouseDragged(Bas
icListUI.java:851)
at java.awt.Component.processMouseMotionEvent(Component.java:4183)
- duplicates
-
JDK-4407346 Merlinb48: InvalidDnDOperationException in Stylepad on Sol2.6
- Closed
-
JDK-4389423 Default JList DnD support fails with InvalidDnDOperationException
- Closed
-
JDK-4388203 stylepad demo throws NullPointerException at BasicDropTargetListener.java:211
- Closed
- relates to
-
JDK-4527596 drag-n-drop operation hangs a java application
- Open
-
JDK-4558745 Deadlock occurs while copying
- Closed
-
JDK-4643942 Deadlock while performing "javax.swing.JTextComponent.copy"
- Closed
(1 relates to)