0

I was wondering if there was some way to handle the Drag&Drop between the OS Explorer and a JDesktopPane (embedded in a netbeans application).

After a few hours crawling the internet, I found nothing relevant of such a behavior.

In the "java-to-OS" way, I can understand it could not be possible, but in the other way it should be possible to get the File (or similar) of the dropped explorer item.

Any ideas ?

EDIT

Found partial solution here : how to drag and drop files from a directory in java

But no solution for reverse operation (from Java to OS)...

Community
  • 1
  • 1
Benj
  • 1,184
  • 7
  • 26
  • 57
  • 1
    If you register a `DropTarget` against the `JDesktop`, you should receive a `List` containing all the `File`(s) dragged from the OS. I don't recall what the data flavour is off hand though, but you should be able to experiment. Or just look at [this example](http://stackoverflow.com/questions/13597233/how-to-drag-and-drop-files-from-a-directory-in-java/13597635#13597635) – MadProgrammer Dec 07 '13 at 02:53
  • Thanks @MadProgrammer, I'll try that soon and post the solution if any. – Benj Dec 07 '13 at 22:06
  • I found nothing because of searching with `JDesktopPane`, which seems to be a too restrictive keyword. – Benj Dec 07 '13 at 23:20
  • Did you take a look at the example I linked, this is the basic concept of what you need to try – MadProgrammer Dec 08 '13 at 02:03
  • Yes, i'd look at it and i will try it as soon as possible. I'll post results here. – Benj Dec 10 '13 at 00:10

0 Answers0