import java.awt.Color; //use Color class import uwcse.graphics.*; /** * A class to create the display of 2 circles in a graphics window * * @author CSC 142 */ public class SomeGraphics { // instance fields private GWindow window = new GWindow(); private Oval circle1 = new Oval(); private Oval circle2 = new Oval(); // constructor /** * Create the display of 2 circles in a graphics window
* one circle is blue, the other is red */ public SomeGraphics() { // circle1 is blue circle1.setColor(Color.blue); // circle2 is red circle2.setColor(Color.red); // move circle2 to the right by 80 pixels circle2.moveBy(80, 0); window.add(circle1); window.add(circle2); } }