![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]()
|
||
|
![]() |
|
|
|
![]() |
|
A TextArea is a multirow text field that displays a single string of characters, where a newline ends each row. The width and height of the field is set at construction, but the text can be scrolled up and down and left and right. Corresponding source code: import java.applet.*; import java.awt.*; public class TextAreaWidget extends Applet { public void init() { TextArea disp = new TextArea("A TextArea", 3, 30); add(disp); } } Methods:
There is no predefined way to set a particular row of text. Carriage returns are used to separate the rows, which must be counted to get to the nth row. Related exercises: |