Creating a JTextArea Component
import javax.swing.JTextArea;
public class Main {
public static void main(String[] argv) {
// Create a text area with some initial text
JTextArea textarea = new JTextArea("Initial Text");
int rows = 20;
int cols = 30;
textarea = new JTextArea("Initial Text", rows, cols);
}
}
Related examples in the same category