File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Handeling DnD in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Handeling DnD in Java" Watch "Handeling DnD in Java" New topic

Handeling DnD in Java

Chris Romkema

Joined: Jul 06, 2007
Posts: 2

Hello I have a question about DnD handling in java.

I know it's possible to handle Drag and Drop within one java application, however is it possible to handle items that are being dragged from outside a java application? For instance is it possible to handle a MS-Windows file being dropped in a java application?

To put it into context.
I want to drag a .exe file onto my Swing application, then a new button should be created on that component where the item was dropped. This button should have the same functionality as .... a .lnk file in windows explorer for instance.

Is there anyone who can give me some assistance?

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46349
I presume you are aware of the section in the Java Tutorials about drag'n'drop?
I agree. Here's the link:
subject: Handeling DnD in Java
It's not a secret anymore!