Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.applet.*;
- /*<applet code = "MyApplet.class" height = 400 width = 400></applet>*/
- public class MyApplet extends Applet{
- public void paint(Graphics g){
- g.setColor(Color.YELLOW);
- g.fillOval(100, 50, 200, 200); //face
- g.setColor(Color.black);
- g.drawOval(155, 110, 10, 40); //left eye
- g.fillOval(155, 140, 10, 10); //left eyeball
- g.drawOval(230, 110, 10, 40); //right eye
- g.fillOval(230, 140, 10, 10); //right eyeball
- g.drawLine(190, 170, 210, 170); //base nose
- g.drawLine(190, 170, 200, 160); //right nose
- g.drawLine(210,170, 200, 160); //left nose
- g.drawArc(150, 160, 100, 50, 180, 180); //upper lip
- g.drawArc(150, 140, 100, 100, 180, 180); //lower lip
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement