Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Drag 'n Drop outside Java

I want to make a dialog in a Java application containing a JList (Swing) .. I need to drag an item from this JList and drop it outside the dialog in a text editor (Microsoft Front Page for example)
0
Lion24
Asked:
Lion24
1 Solution
 
tomboshellCommented:
a quick-n-dirty solution...

Try getting the system clipboard.  You will have to use the abstract method 'getSystemClipboard()' from the Toolkit found in the java.awt package.  Then you can set the contents of the list entry in the clipboard and do a paste operation in any other application that has copy-paste enabled.  The clipboard class can be found in java.awt.datatransfer.  
0
 
Lion24Author Commented:
I think I want more clarification .. plus I need drag and drop not copy and paste. If anyone has a sample code or can recommend a website I would be very grateful.

Thanx
0
 
Lion24Author Commented:
I think I want more clarification .. plus I need drag and drop not copy and paste. If anyone has a sample code or can recommend a website I would be very grateful.

Thanx
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Lion24Author Commented:
I think I want more clarification .. plus I need drag and drop not copy and paste. If anyone has a sample code or can recommend a website I would be very grateful.

Thanx
0
 
tomboshellCommented:
That would be interesting.  I'm not sure how that would work with interacting with another non-Java program on whatever platform you are using.  So far as I know (with a grain of salt in that I haven't yet had to program drag-n-drop) the dnd for java is meant to work with Java.  That was why I suggested the copy-paste solution.  I know that the needed libararies are found in the java.awt.dnd directory (if you have the javadocs)
the java tutorial section on the subject: http://java.sun.com/docs/books/tutorial/dnd/index.html
0
 
Venci75Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by: tomboshell
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now