Draw and fill Oval using Applet and AWT

import java.awt.*;
import java.applet.*;
/*
<applet CODE="OvalExample.class" WIDTH=150 HEIGHT=150>
</applet>
*/
public class OvalExample extends Applet
{

    public void paint(Graphics g)
    {
        g.drawOval(20, 20, 50, 60);
        g.drawOval(90, 20, 50, 60);
        g.fillOval(30, 50, 30,30);
        g.fillOval(100,50,30,30);

    }
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|