• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cut copy and paste functions

 
Burt Reynolds
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic