Solved

Java Programming question

Posted on 1997-08-30
2
177 Views
Last Modified: 2010-04-16
How can I set a graphics image to the System Clipboard (as in Java 1.1.3 +). I want to use the System clipboard for cutting and pasting images.
0
Comment
Question by:maneeshsahu
2 Comments
 
LVL 4

Expert Comment

by:russgold
ID: 1226028
What kind of images?  There are many image formats, and not all are understood on all platforms.  Also, note that untrusted applets cannot use the system clipboard.  Are you writing an applet or application?
0
 
LVL 4

Accepted Solution

by:
rembo earned 50 total points
ID: 1226029

To transfer images you will have to use the mime types that are
part of the DataFlavor classes.  For a tutorial on how
to do this look at:

http://smaug.java.utoronto.ca/Resources/Local/jdk1.1/docs/guide/awt/designspec/datatransfer.html

For API references take a look at:

http://g.oswego.edu/dl/java/api/java.awt.datatransfer.DataFlavor.html

and

http://g.oswego.edu/dl/java/api/java.awt.datatransfer.Transferable.html#_top_
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now