Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Drag and Drop

 
Umashankar Arora
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nigel Chou
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic