Method getSelectedText()
Return type:
java.lang.String
Member of:
javax.swing.text.JTextComponent
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
tempArea.setText(this.getSelectedText());
2
clip.setContents(new java.awt.datatransfer.StringSelection(component.getSelectedText()), null);
3
String selection = editor.getSelectedText();
4
String selection = editor.getSelectedText();
5
if(((JTextComponent)getSource()).getSelectedText() != null &&
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.