import animax.Grafix;
import java.awt.Color;
class FlashingLight extends GrafixFlasher
{
int x = 100, y = 100;
int w = 100, h = 100;
public void draw ()
{
if(state==0) Grafix.out.setC olor(Color.red) ;
if(state==1) Grafix.out.setC olor(Color.yell ow);
Grafix.out.fill Oval(x,y,w,h);
}
}
class Demo17B
{
public static void main (String[]args)
{
FlashingLight light = new FlashingLight() ;
light.draw();
light.flashCont inuosly();
}
}
import java.awt.Color;
class FlashingLight extends GrafixFlasher
{
int x = 100, y = 100;
int w = 100, h = 100;
public void draw ()
{
if(state==0) Grafix.out.setC olor(Color.red) ;
if(state==1) Grafix.out.setC olor(Color.yell ow);
Grafix.out.fill Oval(x,y,w,h);
}
}
class Demo17B
{
public static void main (String[]args)
{
FlashingLight light = new FlashingLight() ;
light.draw();
light.flashCont inuosly();
}
}
Comment