home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java by Example
/
jbecd.bin
/
JBE-CD
/
NTUsers
/
JBECODE.ZIP
/
JavaByExample
/
chap31
/
ColorThread2.java
< prev
next >
Wrap
Text File
|
1996-03-21
|
597b
|
34 lines
import java.awt.Color;
public class ColorThread2 extends Thread
{
ThreadApplet6 applet;
int count;
ColorThread2(ThreadApplet6 applet)
{
this.applet = applet;
}
public void run()
{
while (true)
{
applet.color1 = Color.red;
applet.color2 = Color.green;
applet.color3 = Color.blue;
applet.repaint();
try
{
sleep(100);
}
catch (InterruptedException e)
{
}
}
}
}