CrazyFace

CrazyFace - canvas.fillOval(230, 50, 10, 35);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import javax.swing.JApplet; import java.awt.Color; import java.awt.Graphics; public class CrazyFace extends JApplet { public void paint(Graphics canvas) { setSize(400, 400); canvas.setColor(Color.BLACK); canvas.drawOval(100, 50, 200, 200); canvas.fillOval(155, 100, 10, 20); canvas.fillOval(230, 100, 10, 20); canvas.drawArc(150, 200, 100, 50, 400, 100); canvas.fillArc(65, 60, 80, 120, 50, 220); canvas.fillArc(260, 70, 80, 120, 260, 225); canvas.fillOval(180,150,30,30); canvas.setColor(Color.RED);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: canvas.fillOval(230, 50, 10, 35); canvas.fillOval(250, 50, 10, 35); canvas.fillOval(225, 70, 40, 10); canvas.fillOval(225, 55, 40, 10); canvas.fillRect(185, 310, 10, 30); canvas.fillRect(205, 310, 10, 30); canvas.fillRect(155, 270, 30, 10); canvas.fillRect(215, 270, 30, 10); canvas.setColor(Color.PINK); canvas.fillArc(85, 90, 30, 60, 50, 220); canvas.fillArc(287, 100, 30, 60, 260, 220); canvas.fillRect(185, 250, 30, 60); } }...
View Full Document

Ask a homework question - tutors are online