Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
How to copy a string variable to the clipboard?
Jon Hedge
Greenhorn
Posts: 6
posted 8 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi ,
I would like to know how I copy a
string
variable like for example :
String s = "Java Forum";
into the clipboard. The output of the code being "Java Code" written in a search browser.
Thanks in advance for your help.
Dave Tolls
Rancher
Posts: 4801
50
posted 8 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You can get the system clipboard via
AWT's Toolkit class
.
You might need to read around as to how you actually put stuff onto it, but that should give you a start.
Jon Hedge
Greenhorn
Posts: 6
posted 8 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Based on your post I found the solution thanks.
A teeny tiny vulgar attempt to get you to buy our stuff
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Need help with clipboard.
copy selected data from JTable's cell to clipboard
Populating fields on a webpage based on the remote webpage data
How to copy a image to clipboard in FIREFOX browser using javascript?
How to get files copied to office clipboard?
More...