Thread: Java drag and drop woes
02-20-2007, 09:55 PM #1Java drag and drop woes
I'm trying to get over some specific hurdles in a java swing program.
As a proof-of-concept, I made a jar that accepts files dropped onto the main window. Pretty simple, really. Just implement the DnD interface and you end up with a list of pathnames. Simple.
However, what I want to do is allow the user to drop the files onto the icon of my program and launch the program. Similar to dropping a file onto a printer icon and voila, it starts printing.
I can do this with windows by making a shortcut to "javaw.exe -jar DropTarget.jar", and the file names come in as command line parameters.- the args variable in main(String args).
This will not be a file type specific to my program- the user might drop in pdfs, text files, various binary files, etc.
06-03-2009, 12:11 PM #2
- Member Since
- Jun 03, 2009
I am trying to do the same thing. i Noticed that you posted this a while ago and was wondering if you ever found a solution to it.if you did can you please share! thank you!
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By quackagator in forum OS X - Operating SystemReplies: 1Last Post: 04-07-2014, 11:50 AM
By ceejay in forum Switcher HangoutReplies: 27Last Post: 09-04-2010, 11:18 PM
By willy.ca in forum Switcher HangoutReplies: 20Last Post: 05-15-2010, 04:56 PM
By Åmund in forum Apple NotebooksReplies: 3Last Post: 03-29-2010, 04:36 PM
By brkpsu in forum Movies and VideoReplies: 0Last Post: 02-25-2006, 04:16 PM