File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Drag and Drop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Drag and Drop" Watch "Drag and Drop" New topic

Drag and Drop

Umashankar Arora

Joined: Aug 28, 2002
Posts: 5
I am having JList as DragSource and DropTarget. When i drag an object from one Jlist and drop that on other or same JList, then some times the mouseDragged is called continously even if the mouse is not dragged. what the problem is. can any one guide me.

Umashakar Arora<br />Software Programmer<br />Indicus Software P. Ltd.<br />Pune<br />India
Nigel Chou
Ranch Hand

Joined: Oct 11, 2001
Posts: 47
If the procedure executed when starting drag in your program consumes much time, then the program can�t detect that the user have dropped, when the user releases the mouse after a quick drag, so there are still mouseDragged(). So dragGestureRecognized() should not be coded to be time-consuming.
Hope that helpful!

Umashankar Arora

Joined: Aug 28, 2002
Posts: 5
Hello Jianping,
I have tried drag and drop with very simple transfer of string between two lists but still the problem exits. The mouseDragged is called continously and the selection in the list after that is difficult. after clicking an item many times it comes out of the mouseDragged and selection is possible. I am unable think what is problem
I agree. Here's the link:
subject: Drag and Drop
It's not a secret anymore!