Creating a JTextArea Component - Java Swing

Java examples for Swing:JTextArea

Description

Creating a JTextArea Component

Demo Code

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*/
}

Related Tutorials