File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes String to Clipboard Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String to Clipboard" Watch "String to Clipboard" New topic
Author

String to Clipboard

Kintaro OHEE
Greenhorn

Joined: May 15, 2003
Posts: 1
Hi folks,
How do U copy a String to the clipboard. Allowing a user to paste the copied String, into the notepad for example, with the combination of ctrl+v.
Thankx
Gabriel White
Ranch Hand

Joined: Mar 02, 2003
Posts: 233
you can write the string to a file, if that is OK.
Tom Purl
Ranch Hand

Joined: May 24, 2002
Posts: 104
I didn't know this until a few minutes ago, but there's a standard clipboard class offered by Sun. Maybe this is what you're looking for.


Tom Purl<br />SCJP 1.4
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Clipboard oughtta do it. Here's a rather more advanced example enabling cut & paste between Excel and a Swing table.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: String to Clipboard
 
Similar Threads
Handling clipboard
Passing double quotes to main()
Need help exporting to clipboard
ClipBoard
Clearing clipboard from java