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>