Also, I think paintComponent() is a protected method of JPanel.

Yep. I checked to make sure and it is, though it's not a JPanel method directly. It's a JComponent method that JPanel inherited.