Read the API for the JTextComponent (Java 2 Platform SE 5.0)
It only works for the selected text. A workaround is to save the selection, select all, call copy, then reset the original selection. I...
Type: Posts; User: copeg
Read the API for the JTextComponent (Java 2 Platform SE 5.0)
It only works for the selected text. A workaround is to save the selection, select all, call copy, then reset the original selection. I...
JTextArea inherits a copy() method from JTextComponent, so just invoke this method:
textarea.copy();
Remember that if there is a selection the copy() method only copies that portion.