User Profile
Collapse
-
i'm awfully sorry. my question is that i'm tryin to design a traffic light that changes 3 different colors. i have tried everthing but doesnt seem to do . i'm not an expert in java just a beginer... -
Re: Urgent Java Help Plzzzzzzz
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);
}
}
...
No activity results to display
Show More
Leave a comment: