import element.*; public class Sphinx { private static DrawingWindow d; private static ConsoleWindow c; public static void main(String args[]) { d = new DrawingWindow(); c = new ConsoleWindow(); Rect riddleButton = new Rect(90,90,20,20); d.draw(riddleButton); long stopTime = System.currentTimeMillis(); stopTime = stopTime + 1000; while (System.currentTimeMillis() < stopTime); if (d.mousePressed()) if (riddleButton.contains(d.getMouse())) c.out.println("What walks on 4 legs, then 2, then 3?"); else c.out.println("You missed the button and a great riddle!"); else c.out.println("Hello? Anyone there?"); } }