New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Java drag and drop woes


Post Reply New Thread Subscribe

 
Thread Tools
Paul Heitkemper

 
Paul Heitkemper's Avatar
 
Member Since: Feb 20, 2007
Posts: 1
Paul Heitkemper is on a distinguished road

Paul Heitkemper is offline
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.

Any thoughts?
QUOTE Thanks
Srey

 
Member Since: Jun 03, 2009
Posts: 2
Srey is on a distinguished road

Srey is offline
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!
QUOTE Thanks

Post Reply New Thread Subscribe


« Interface Builder Help | Drag and Drop »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
iMovie - cant drag + drop!!! Jojack Movies and Video 1 02-09-2007 11:32 PM
The true Drag and Drop. iLoki Switcher Hangout 19 07-31-2006 01:13 PM
No Drag and Drop with Preview simplegray OS X - Apps and Games 5 04-26-2006 07:09 PM
Drag and Drop brkpsu Movies and Video 0 02-25-2006 04:16 PM

All times are GMT -4. The time now is 12:38 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?