What is the purpose of using `paintComponent()` in Java?
The `paintComponent()` method is used to display images directly on components like `JLabel` and `JPanel`.
Thatâ€™s incorrect. `paintComponent()` is for custom rendering in general, and is not directly used to display images on `JLabel`.
Can you explain how you would display an image using `paintComponent()` and the `Graphics` object?