Package javax.swing

Examples of javax.swing.JTextArea.replaceRange()


    t1.setText("0123456789");
    t1.setSelectionStart(2);
    t1.setSelectionEnd(5);
    harness.check(t1.getSelectedText(),"234","getSelectedText");
    t1.replaceRange("replacement", 3, 5);
    harness.check(t1.getText(),"012replacement56789","replacement");
    t1.insert("insertion", 1);
    harness.check(t1.getText(),"0insertion12replacement56789","insertion");
    t1.setSelectionStart(0);
    t1.setSelectionEnd(1);
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.