APPLETS

15. Java Program to Draw a Smiling Face using Graphics Class Methods

            import java.applet.Applet;
            import java.awt.Graphics;
            
            public class MyApplet13 extends Applet
            {
               public void paint(Graphics g)
                {
                          g.drawOval(100, 100, 300, 300);
                          g.drawOval(200, 200, 30, 40);
                          g.drawOval(300, 200, 30, 40);
                          g.drawArc(200, 260, 120, 70, 180, 180);
            }
            }
            /*<applet code="MyApplet13.class" width="500" height="500"></applet>*/
            
        

OUTPUT

smiley