help canvas circle problem

Joined
Sep 7, 2011
Messages
1
Reaction score
0
i am drawing a circle for my assignment in simple canvas

public void drawJP(int width){
int height = width * 7/10;
SimpleCanvas c = new SimpleCanvas("Japan", width, height);

c.setForegroundColour(java.awt.Color.red);
for (int i = 0; i < 360 ; i++) {
c.drawLine( width/2 , height/2, (Math.sin(i) * width/6) , (Math.cos(i) * width/6) );
}
}


But a error showed up

drawLine(int,int,int,int) in SimpleCanvas cannot be applied to (int,int, double, double)

can anyone help me with that
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top