Infolinks In Text Ads

Jun 26, 2010

How to Draw a circle in Applet java Code example

public static void drawCircle(Graphics g, int i, int j, int k, int l)
    {
        k += l / 2;
        for(int i1 = 0; i1 < l; i1++)
        {
            drawCircle(g, i, j, k);
            if(i1 + 1 < l)
            {
                drawCircle(g, i + 1, j, k - 1);
                drawCircle(g, i - 1, j, k - 1);
                drawCircle(g, i, j + 1, k - 1);
                drawCircle(g, i, j - 1, k - 1);
                k--;
            }
        }

    }

No comments:

Post a Comment

LinkWithin

Related Posts Plugin for WordPress, Blogger...