import uwcse.graphics.*; // access the graphics utilities in the uw library import java.awt.Color; // access the Color class /** *
* A FaceScene displays smiling faces in a graphics window *
* * @author Your name here */ public class FaceScene { /** * Creates a picture */ public FaceScene() { // The graphics window // The window is by default 500 wide and 400 high GWindow window = new GWindow("Face scene"); window.setExitOnClose(); // so that a click on the close box of the // window terminates the application // Background (cyan here) Rectangle bgnd = new Rectangle(0, 0, window.getWindowWidth(), window .getWindowHeight(), Color.cyan, true); window.add(bgnd); // Create the scene elements new SmilingFace(100, 300, 1.5, window); new SmilingFace(50, 50, 1, window); new SmilingFace(200, 200, 0.5, window); new SmilingFace(50, 200, 0.25, window); } /** * Starts the application */ public static void main(String[] args) { new FaceScene(); } }