//File: Play.java import CSLib.*; import java.awt.*; public class Play { public static void main (String [] args) { DrawingBox pad = new DrawingBox ("Fun & games with shapes"); pad.setSize (400, 400); pad.drawLine (0 , 0 , 100 , 100); //Draws a line from (0,0) to (100,100) pad.drawRect (100, 100, 100, 50); //Draw a rectangle whose upper left hand corner is at (100,100) //with width=100 pixels and height=50 pixels //Dip our brush into the blue paint can pad.setColor (Color.BLUE); pad.fillRect (250, 100, 100, 50); //Fill a rectangle whose upper left hand corner is at (250,100) //with width=100 pixels and height=50 pixels pad.setColor (Color.RED); pad.fillCircle (225, 50, 25); //Fill a circle with center at (225, 50) with radius 25 pad.setColor (Color.CYAN); pad.fillOval ( 213, 175, 25, 50); //Fill an oval inscribed inside a rectangle whose upper //left hand corner is at (213, 175) with width=25 pixels //and height=50 pixels } }