I've run into some problems concerning dragging and dropping in a JTree using the right mouse button. I'm currently developing on a UNIX computer and this seems to complicate the whole thing, since DnD using the RMB is disabled or something...?

However, I managed to work around this by implementing my own subclass to MouseDragGestureRecognizer, therein listening for RMB dragging and firing an event which in turn is handled by the dragGestureRecognized event handler. This method then starts the drag operation using startDrag.. so far so good...

...But when I release the right mouse button, nothing happens! The dragDropEnd event Handler doesn't react, and neither does the mouseReleased handler (although this seems to be normal when using DnD.. right?). The mouse pointer simply won't let go of the object it's dragging. Clicking the LEFT mouse button makes the pointer drop the object, but that's not the way I want it to work.

Note that using the exact same mouseDragGestureListener and event handlers works perfectly for Drag-and-Dropping using the LEFT mouse button.

I appreciate any help!