Color[i]=...
can't work at all, because Color
is the name of the class, not your variable. What you want to change is OvalColor[i]
, not Color[i]
.
You could try OvalColor[i]=new Color(r, g, b)
to assign to one of your colors, but i guess there's more than that to fix; OvalColor
probably shouldn't be local to the OvalData()
method.
Not related to your problem, but to your coding style: Please use initial Caps for class names only, and initial lowercase for variable and method names, like ovalColor
or public void ovalData(...)
. This makes problems like the one you're having much easier to spot - you'll get used to "Assigning to something hat has an initial capital letter won't work" after a while.