Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String to Clipboard

 
Kintaro OHEE
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can write the string to a file, if that is OK.
 
Tom Purl
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clipboard oughtta do it. Here's a rather more advanced example enabling cut & paste between Excel and a Swing table.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic