aspose file tools*
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
Author

Drag and Drop

Umashankar Arora
Greenhorn

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!


SCJP for Java 2, SCWCD, SCMAD
Umashankar Arora
Greenhorn

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: http://aspose.com/file-tools
 
subject: Drag and Drop