BCA Slip30 Java

Java

Slip30

Q.1) Write an applet application in Java for smile face. [Marks 30] 

Solution

Face.java

import java.applet.*;
import java.awt.*;

/*
<applet code = "Face" width = 400 height = 400>
</applet>
*/

public class Face extends Applet
{
   public void paint(Graphics g)
   {
     

      g.drawOval(100,100,150,150);

    g.drawOval(75,140,30,30);
      g.drawOval(247,140,30,30);

       g.fillOval(125,140,30,30);
      g.fillOval(195,140,30,30);
     g.drawLine(175,150,175,210);
     g.drawArc(150,180,50,50,200,140);

   }
}


f.html

<html>
<body>
<applet code="face.class" width=500 height=500 align="center">
</applet>
</body>

</html>












BCA Pratical Solution

My name is Vivek And I from Mumbai and Complete my Graduation Bca.my Age is 23 Years.

Post a Comment

Previous Post Next Post