scrum
12-07-2007, 08:01 AM
int width = getWidth();
int height = getHeight();
int counter = 0;
int counter2 = 0;
while (counter < 7)
{
g.drawOval(width*counter/8 ,0, width*(counter+1)/8 ,height/8);
counter++;
}
I'm trying to print a row if 8 cirlces the same size along the top of a jpane, but it doesn't work.
the first circle prints
the second circles starts at the right place but streches out to double where it should be
the third also starts at the right place but stretches out weird again.
int height = getHeight();
int counter = 0;
int counter2 = 0;
while (counter < 7)
{
g.drawOval(width*counter/8 ,0, width*(counter+1)/8 ,height/8);
counter++;
}
I'm trying to print a row if 8 cirlces the same size along the top of a jpane, but it doesn't work.
the first circle prints
the second circles starts at the right place but streches out to double where it should be
the third also starts at the right place but stretches out weird again.