CMSI 688
Homework #2

This assignment is going to be done during class. There is only one problem. You have one half-hour to do it.

  1. Create an Swing component called AngleReader which displays a picture of a circle and notifies all its listeners of the angle, in degrees, that the mouse cursor makes with the center of the circle as the mouse moves over it. The purpose of this problem is for you to get first-hand experience with the object-oriented way to do "callbacks," namely, via registration of listeners that implement a known interface, rather than using method pointers. In this exercise you are to create a custom listener interface.