posted 15 years ago
I am unaware of your requirements. I am not sure if you are looking for an even distrubution of the values, or a circle with "slices" representing values. First I just added a drawcircle method, which I first envoked, so I could focus on the slices (see code addition). I then removed the calculations from the setAngle Method (again, see code modification). Code needs cleaning. Hope it helps.
[code]
...
void drawcircle() {
Arc2D arc = new Arc2D.Double(0,0,width,height,0,360,Arc2D.PIE);
arcs.add(arc);
}
...
public void setAngle(double value) {
angle = value;
}
Software development is an exercise in thinking not coding.