Need help on Doing Drag and Drop b/w from Desktop to Java's Frame

1 view
Skip to first unread message

swapan.s1

unread,
Jul 2, 2009, 4:18:17 AM7/2/09
to Java Web Application
Currently, i am working on Java project where I have a Java Frame and
I want to DRAG and DROP a "text file's Location" (say Text File Icon
on Desktop) onto Frame's Text Field.

Eg: Suppose there is one file A.txt on Desktop. The Path Location will
be
"C:\Documents and Settings\UserName\Desktop\A.txt".

So, required is that when i do Drag and Drop of the Desktop Icon
of
A.txt onto Frame's TextField, it should end up having the
Location Path of it i.e;
"C:\Documents and Settings\UserName\Desktop\A.txt" .

With my little Experience on Java, i am not able to figure out the
Correct Listeners and import Class. At the same time, i am aware of
the DND (Drag and Drop) Import class, but that that works only under
same JVM context. Correct me if i am wrong.

But here, the context establishment should be made b/w:

1. Underlying OS (Eg: Windows), and
2. JVM (The Frame that i have talked in above discussion)


Thanks for any inputs on achieving this in advance.

Regards,
Swapan
Reply all
Reply to author
Forward
0 new messages