Mouse freeze bug

In both the applet and the application (which share all but startup code) the mouse seems to respond only intermittently after the program has been running for a while. And there seems to be more trouble with the right button than the left button, and more with the middle than the right.

I have followed all the instructions on line for running this swing application in the Java tutorial for concurrency in swing, to no avail.

There's a println in the code that tells you when a mouse click has been detected. Sometimes you see it, sometimes you don't.

All help welcome!