Java examples for Swing:JTextArea
Creating a JTextArea Component
import javax.swing.JTextArea; public class Main { public static void main(String[] args) throws Exception { JTextArea textarea = new JTextArea("Initial Text"); int rows = 20; int cols = 30; textarea = new JTextArea("Initial Text", rows, cols); }/*ww w .j a va 2 s.c o m*/ }