The applet should display red when the left mouse button is clicked, blue when the right is clicked, and yellow when the center button is clicked.

source code