JTextComponent: replaceSelection(String content) : JTextComponent « javax.swing « Java by API
- Java by API
- javax.swing
- JTextComponent
JTextComponent: replaceSelection(String content)
import javax.swing.JTextArea;
import javax.swing.text.JTextComponent;
public class Main {
public static void main(String[] argv) {
JTextComponent c = new JTextArea();
c.replaceSelection("replacement text");
}
}
Related examples in the same category