public GProgramListener(GraphicsProgram program) {
		myProgram = program;
		try {
			Class<?> programClass = program.getClass();
			Class[] types = { Class.forName("acm.graphics.GPoint") };
			try {
				mousePressedHook = programClass.getMethod("mousePressed", types);
			} catch (NoSuchMethodException ex) {
				/* Empty */
			}
			try {
				mouseReleasedHook = programClass.getMethod("mouseReleased", types);
			} catch (NoSuchMethodException ex) {
				/* Empty */
			}
			try {
				mouseClickedHook = programClass.getMethod("mouseClicked", types);
			} catch (NoSuchMethodException ex) {
				/* Empty */
			}
			try {
				mouseMovedHook = programClass.getMethod("mouseMoved", types);
			} catch (NoSuchMethodException ex) {
				/* Empty */
			}
			try {
				mouseDraggedHook = programClass.getMethod("mouseDragged", types);
			} catch (NoSuchMethodException ex) {
				/* Empty */
			}
		} catch (Exception ex) {
			throw new ErrorException(ex);
		}
	}