JTextArea: replaceRange(String str, int start, int end)
import javax.swing.JTextArea;
public class Main {
public static void main(String[] argv) {
JTextArea ta = new JTextArea("Initial Text");
int start = 0;
int end = 5;
ta.replaceRange(null, start, end);
}
}
Related examples in the same category