This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTree can TransferHandler & DnD Listeners coexist ?  RSS feed

 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

Has anyone tried to add TransferHandler for JTree which implements DnD Listeners too.

I implement DnD behaviors using DnD listeners. I want to support a feature where in user can drag and drop a file/directory from outside the JVM. in such cases I'm getting the following exception:

This thing has been traced to
sun bug 4378091 .
I have java 1.4 even though this bug is fixed in Tiger. I tried all workarounds prescribed

I would dearly appreciate any suggestions/workarounds

TIA
 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem atleast in my case that I had missed acceptDrop() call. hope it may useful to somebody searching for this kind of functionality.

So bottom line for JTree

Go for TransferHandler if you need basic functionality with default Drag & Drop behaviors;

Implement DragGestureListener,DragSourceListener,DropTargetListener if you need better control & functionality especially viz. drag & drop

Anyways the code to handle file drop:

[ August 09, 2005: Message edited by: Ravi Sathish ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!