Link to home
Start Free TrialLog in
Avatar of Lion24
Lion24

asked on

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)
Avatar of tomboshell
tomboshell

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.  
Avatar of Lion24

ASKER

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
Avatar of Lion24

ASKER

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
Avatar of Lion24

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of tomboshell
tomboshell

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange