Solved

Drag 'n Drop outside Java

Posted on 2002-04-29
7
243 Views
Last Modified: 2010-03-31
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
Comment
Question by:Lion24
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 7

Expert Comment

by:tomboshell
ID: 6979756
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
 

Author Comment

by:Lion24
ID: 6985681
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
 

Author Comment

by:Lion24
ID: 6985930
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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:Lion24
ID: 6985932
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
 
LVL 7

Accepted Solution

by:
tomboshell earned 200 total points
ID: 6988043
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
 
LVL 9

Expert Comment

by:Venci75
ID: 7992665
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
 

Expert Comment

by:SpideyMod
ID: 8048322
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb stateless example 2 69
Crystal Reports Licensing Questions 4 87
Bot application - advice 3 81
JVM error from eclipse 1 27
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question