posted 16 years ago
I have see two implementations of a MouseListener interface and I am a little confused. In the first one I add "implements" to the class and implement the methods.
In the second example (shown below) uses an inner class to implement the MouseListener. Both examples seem to work fine, but I am confused by the use of "new MouseListener()", since it is an interface, not a class.