|
TEXTAREAS
AND TEXTFIELDS TextArea:
A text area holds a paragraph of text. There are a few different
ways to implement a text area. TextArea
paragraph = new TextArea( );
Specifying the number of rows and columns you want can set the
size of a textarea.
TextArea paragraph= new
TextArea(30, 60);
You can assign a paragraph or string to a text area, so the area
is filled with whatever the string is.
String Information = “My
name is Sarah…” ;
TextArea paragraph = new TextArea(Information);
TextFields:
A text field holds a line of text that can hold information given
by the user.
TextField Name= new TextField();
This creates a filed that will have a space for the user to type
in information. However notice how here is no label next to this
TextField, this is done inside the parentheses.
|