home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-03-04 | 646 b | 25 lines |
- import java.awt.*;
- import java.applet.*;
-
- public class TextAreaApplet extends Applet
- {
- TextArea textArea;
-
- public void init()
- {
- String s = "This is an example of a\n";
- s += "textarea control, which is not\n";
- s += "unlike a textfield control.\n";
- s += "The big difference is that a\n";
- s += "textarea control can hold many\n";
- s += "lines of text, whereas a\n";
- s += "textfield control deals with\n";
- s += "only one line of text at a time.\n";
-
- textArea = new TextArea(s, 9, 30);
- add(textArea);
-
- resize(300, 180);
- }
- }
-