help canvas circle problem

Discussion in 'Java' started by tylertse, Sep 7, 2011.

  1. tylertse

    tylertse

    Joined:
    Sep 7, 2011
    Messages:
    1
    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
    tylertse, Sep 7, 2011
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ***C.Steamer***
    Replies:
    4
    Views:
    308
    Sudsy
    Sep 29, 2004
  2. Askari
    Replies:
    2
    Views:
    693
    Askari
    Aug 30, 2004
  3. PhilC
    Replies:
    2
    Views:
    864
    PhilC
    Oct 25, 2004
  4. olsr.kamal@gmail.com

    how to d├ęplace a circle in canvas python?

    olsr.kamal@gmail.com, Mar 9, 2013, in forum: Python
    Replies:
    1
    Views:
    85
    Rick Johnson
    Mar 9, 2013
  5. olsr.kamal@gmail.com
    Replies:
    10
    Views:
    244
    Rick Johnson
    Mar 15, 2013
Loading...

Share This Page