This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes drag and drop DND click, then move?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "drag and drop DND click, then move??" Watch "drag and drop DND click, then move??" New topic
Author

drag and drop DND click, then move??

verduka fox
Ranch Hand

Joined: Jan 18, 2001
Posts: 178
I am developing a Java application in 1.5 that utilizes drag and drop to move data between two JLists. My question: why is there a delay in moving the items? I need to first click on the item, then click and drag it to the other list. This behavior isn't intuitive; I wouldn't expect to first have to select the item, then click again to move it. I expect to be able to click and drag the item in one movement. I'm sure I'm just missing something. Can anyone please explain?

Code follows. If you compile and run, you should be able to reproduce the behavior I see.

Thanks in advance!



And the TransferHandler:
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: drag and drop DND click, then move??
 
Similar Threads
JList data from a database - 2 columns - 1 column hidden
How to change mouse cursor during drag and drop
Drag and Drop from JList to JTable.
Restrict drops to JPanel where it's drags are from.
Drag cursor not changing, but drop succeeding.