*
The moose likes Java in General and the fly likes cut copy and paste functions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "cut copy and paste functions" Watch "cut copy and paste functions" New topic
Author

cut copy and paste functions

Burt Reynolds
Greenhorn

Joined: Nov 26, 2003
Posts: 2
how do I write code that will use the clip board to cut copy and paste text into or from a input textArea?
Vikalp Setya
Greenhorn

Joined: May 10, 2003
Posts: 18
Hi,
I think every swing text components supports copy/paste/cut to and from clipboard. There's cut(), copy() and paste() methods in JTextArea. For corresponding Action classes, see DefaultEditorKit.cutAction, DefaultEditorKit.copy action. Text cut/copied from textfield goes to the clipboard automatically.


Regards,<br />vikalps
 
Don't get me started about those stupid light bulbs.
 
subject: cut copy and paste functions
 
Similar Threads
JTextField - Restrict length
WA #1.....word association
need help eveluating code
help needed in cuttin ,copy and pasting of images
Cut Copy Paste n SelectAll in JTextPane