/** * Deletes the selected text from the text area and places it * into the clipboard. */ public void cut() { if(editable) { copy(); setSelectedText(""); } }
public void actionPerformed(ActionEvent evt) { JEditTextArea textArea = getTextArea(evt); if(!textArea.isEditable()) { textArea.getToolkit().beep(); return; } textArea.setSelectedText("\n"); } }
buf.append(selection); selection = buf.toString(); setSelectedText(selection);
setSelectedText(str); return; if(caretLineEnd - caret <= str.length()) setSelectedText(str); return;
!= textArea.getSelectionEnd()) textArea.setSelectedText("");
!= textArea.getSelectionEnd()) textArea.setSelectedText("");
if(start != textArea.getSelectionEnd()) textArea.setSelectedText("");
if(start != textArea.getSelectionEnd()) textArea.setSelectedText("");