I imagine that much of the mechanics of paintComponent are to be found in Container, but I haven't looked at the source to know exactly what does what.

Edit: JPanel doesn't even have a...