Interesting bug...
in paintComponent you call super.paint, which in turn calls the paint mathods for the various parts of the JFrame, including a call to paintComponent. That's a recursive loop. You should be calling super.paintComponent