home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java by Example
/
jbecd.bin
/
JBE-CD
/
NTUsers
/
JBECODE.ZIP
/
JavaByExample
/
chap06
/
Applet3.java
< prev
next >
Wrap
Text File
|
1996-01-30
|
455b
|
26 lines
import java.awt.*;
import java.applet.*;
public class Applet3 extends Applet
{
TextField textField;
public void init()
{
textField = new TextField(20);
add(textField);
}
public void paint(Graphics g)
{
String s = textField.getText();
g.drawString(s, 40, 50);
}
public boolean action(Event event, Object arg)
{
repaint();
return true;
}
}