Friday, 14 June 2013

program in java - draw Round Rectangle with awt


import java.awt.*;
class a4 extends Frame
{
    public static void main(String args[])
    {
        a4 a=new a4();
        a.setTitle("RoundRectangle");
        a.setSize(500,500);
        a.setVisible(true);
        //a.show();
    }
    public void paint(Graphics g)
    {


        g.drawRoundRect(180,180,200,200,20,20);

        g.drawRoundRect(60,60,120,120,20,20);
    }
}

No comments: