extends JPanel and overriding paintComponent are inheritance — a Unit 4 idea you are borrowing today because Swing gives you no other way in. Follow the shape; the formal version arrives in January.