Don't call setBackground from paintComponent. That will trigger another repaint which will call paintComponent again. Instead of using your variable "background" just call setBackground in your event handlers.
And you're calling super.paintComponents instead of super.paintComponent. Because both methods exist you didn't get a compiler error but
you should definitely fix that.