home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-03-21 | 549 b | 33 lines |
- import java.awt.*;
- import java.applet.*;
- import MyThread;
-
- public class ThreadApplet2 extends Applet
- {
- MyThread thread;
- String displayStr;
- Font font;
-
- public void start()
- {
- font = new Font("TimesRoman", Font.PLAIN, 72);
- setFont(font);
-
- displayStr = "";
-
- thread = new MyThread(this);
- thread.start();
- }
-
- public void stop()
- {
- thread.stop();
- }
-
- public void paint(Graphics g)
- {
- g.drawString(displayStr, 50, 150);
- }
- }
-
-