solution for shapes

solution for shapes - page.fillRect (375, 375, 25, 25);

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

View Full Document Right Arrow Icon
import javax.swing.*; import java.awt.*; public class Shapes extends JApplet { public void paint (Graphics page) { setSize(400,400); page.setColor(Color.blue); page.fillRect (0, 0, 200, 200); page.fillRect (200, 200, 100, 100); page.fillRect (300, 300, 50, 50); page.fillRect (350, 350, 25, 25);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: page.fillRect (375, 375, 25, 25); page.setColor(Color.red); page.fillArc(200, 0, 200, 200, 90, 90); page.fillArc(200, 0, 200, 200, 0, -90); page.fillArc(0, 200, 200, 200, 0, 90); page.fillArc(0, 200, 200, 200, 180, 90); } }...
View Full Document

This note was uploaded on 06/11/2009 for the course CS 205214 taught by Professor Balasooriya/kouvetakis during the Spring '09 term at ASU.

Ask a homework question - tutors are online