Package javax.swing

Examples of javax.swing.JTextArea.replaceSelection()


    harness.check(t1.getText(),"012replacement56789","replacement");
    t1.insert("insertion", 1);
    harness.check(t1.getText(),"0insertion12replacement56789","insertion");
    t1.setSelectionStart(0);
    t1.setSelectionEnd(1);
    t1.replaceSelection("selection");
    harness.check(t1.getText(),"selectioninsertion12replacement56789",
    "insertion");
  }
}
View Full Code Here


    }
    else if(lbl.equals("Paste")) {
      textarea.paste();
    }
    else if(lbl.equals("Delete")) {
      textarea.replaceSelection("");
    }
    else if(lbl.startsWith("Find")) {
      System.out.println("Find/Replace");
    }
    else if(lbl.equals("Undo")) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.