Package java.awt

Examples of java.awt.TextArea.replaceText()


    a.replaceText(" There", 5, 5);
    harness.check(a.getText(), "Hello There World");
   
    // Replace in the middle of text.
    harness.check(a.getPeer(), null);
    a.replaceText("", 6, 12);
    harness.check(a.getText(), "Hello World");
   
    // Replace at the end of text.
    harness.check(a.getPeer(), null);
    a.replaceText("!", a.getText().length(), a.getText().length());
View Full Code Here


    a.replaceText("", 6, 12);
    harness.check(a.getText(), "Hello World");
   
    // Replace at the end of text.
    harness.check(a.getPeer(), null);
    a.replaceText("!", a.getText().length(), a.getText().length());
    harness.check(a.getText(), "Hello World!");
  }

}
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.