TextAreaFormElement class

The TextAreaFormElement class represents a text area element in an HTML form. You specify the size of the text area by setting the number of rows and columns. You can determine the size that a text area element is set for with the getRows() and getColumns() methods.

You set the initial text within the text area with the setText() method. You use the getText() method to see what the initial text has been set to.

The following example shows you how to create a TextAreaFormElement:

    TextAreaFormElement textArea = new TextAreaFormElement("foo", 3, 40);
    textArea.setText("Default TEXTAREA value goes here");
    System.out.println(textArea.getTag());

The code example above generates the following HTML code:

    <form>
    <textarea name="foo" rows="3" cols="40">
    Default TEXTAREA value goes here
    </textarea>
    </form>