color change

I am a cs student and the past few assignment we have had to make it so a color on some object randomly changes color. I have yet to figure that out. On our new assignment we are using an event timer and the ball in our class has to change color every few seconds or so. Can anybody give me some sample code or give me a little direction on how to do this?

[363 byte] By [BigSmooth41a] at [2007-10-3 9:33:05]
# 1

> I am a cs student and the past few assignment we have

> had to make it so a color on some object randomly

> changes color. I have yet to figure that out.

So you didn't do the assignment, or you tried and failed? If you tried what code do you create? What did you try? Why do you think it didn't work?

>On

> our new assignment we are using an event timer and

> the ball in our class has to change color every few

> seconds or so. Can anybody give me some sample code

> or give me a little direction on how to do this?

Before you move on to this why don't you figure out how to change the color. Then work your way up.

When you create the object so far you have been using one color right? Is your problem using a different color or how to determine when to change to the next color?

zadoka at 2007-7-15 4:48:12 > top of Java-index,Security,Event Handling...
# 2
Look at this constructor in the Color class:Color c = new Color(redValue, greenValue, blueValue);How could you randomly create a color for that?
CaptainMorgan08a at 2007-7-15 4:48:12 > top of Java-index,Security,Event Handling...