home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-01-29 | 455 b | 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;
- }
- }
-