// Purpose: demonstrate a nuance of graphical programming import java.io.*; import java.awt.*; public class SeeingDouble { // main(): application entry point public static void main(String[] args) throws IOException { ColoredRectangle r = new ColoredRectangle(); System.out.println("Enter when ready"); System.in.read(); r.paint(); System.in.read(); System.out.println("Enter when ready"); System.in.read(); r.erase(); System.in.read(); System.out.println("Enter when ready"); System.in.read(); r.setY(50); r.setColor(Color.GREEN); r.paint(); } }