I have question about Drag And Drop in Java. I was able to to implement drag and drop files from Windows Explorer to Swing application. Now I need to oposite direction. I have JTable which contains Column with object type File. I just need to detect which file (files) are dragged and where in Windows Explorer.
Thanks in advance.
I was working with java<->native DnD couple of years ago and my findings were something like below.
If you need to know to which folder dragged files were dropped (for example) to write them out from database: I am quite unsure this is possible. The best you could do is precreating files on drag start, passing correct file references to drop target app, and hoping that explorer default drop handler does what you need. I suspect that on drag-out of java app you have no control and no callbacks on the drop target application (until you have own fancy super-hook somewhere on the explorer side).
Not sure your scenario is as bad as mine was; the feature was not critical and we deferred it...
I guess, all you need can be found here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With