in java to draw a circle required 4 parameters ....what this parameter means like for eg.in c to draw a circle syntax is circle(x,y,radius)

bt in java

syntax :

g.drawOval(70,90,200,200);

what 70,90,200,200 means?????

Printable View

- 03-26-2011navedjava (circle)
in java to draw a circle required 4 parameters ....what this parameter means like for eg.in c to draw a circle syntax is circle(x,y,radius)

bt in java

syntax :

g.drawOval(70,90,200,200);

what 70,90,200,200 means????? - 03-26-2011CommonTater
Gee I dunno... This is a C forum ... maybe you should ask in a Java forum....

- 03-26-2011Adak
I know zip about Java, but I'd hazard a guess that 70 and 90 are the x and y coordinates of the center point of the circle.

And the clue I'm working off of is the word "Oval", instead of "circle".

The next two numbers are the maximum distance of the circle, in the x (first number) and y (second number), directions. Enabling it to draw an oval or a circle. - 03-26-2011Subsonics
Google pointed me straight to the java docs:

Graphics (Java 2 Platform SE v1.4.2)