TextAreaTest
Prerequisites
In this exercise, you will write an applet that displays a
TextArea component. A TextArea is a
text type-in box which can hold multiple lines of text
of any width. The TextArea can scroll horizontally
and vertically to view text outside of its display region.
Perform the following tasks:
-
Create an applet called TextAreaTest. In the init method, create a new instance of the TextArea class, store it as an instance variable, and add it to the applet.
-
Define the method mouseDown so that when the user clicks outside the TextArea "\npushed mouse..." gets appended to the TextArea.
The task numbers above are linked to the
step-by-step help page. Also available
is a complete solution that meets
these requirements.
Related Exercises
|