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 DnD from file system into JTree 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 "DnD from file system into JTree" Watch "DnD from file system into JTree" New topic
Author

DnD from file system into JTree

John Gallagher
Greenhorn

Joined: Aug 21, 2001
Posts: 6
I have a JTree that has working drag and drop but I cannot figure out how to drag a file from the operation system and drop it into my JTree. My main problem is figuring out what type of data flavor it is. I think it is a "javaFileListFlavor" but when I "getTransferData(javaFileListFlavor)" and try to cast it into any Object, I get an "InvalidDnDOperationException:No drop current caught while getting Data." Any help would be appreciated.
John
John Gallagher
Greenhorn

Joined: Aug 21, 2001
Posts: 6
It's hard to believe that no one has ever done this.
Any ideas?!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DnD from file system into JTree
 
Similar Threads
collapsing JTree
Strange problem -- Drag and Drop with JTree
Editable JTree????
MouseListener and a Jtree�
JTree DnD multiple node selections?