home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java by Example
/
jbecd.bin
/
JBE-CD
/
NTUsers
/
JBECODE.ZIP
/
JavaByExample
/
chap20
/
TextAreaApplet.java
< prev
next >
Wrap
Text File
|
1996-03-04
|
646b
|
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);
}
}