import objectdraw.*; import java.awt.*; // This program creates a window that displays text when // you click the mouse button. public class TouchyWindow extends FrameWindowController { // when the mouse is pressed, show the text public void onMousePress(Location point) { new Text("I’m touched!", 40, 50, canvas); } // when the mouse is released, erase the text public void onMouseRelease(Location point) { canvas.clear(); } }