I am following the
Java tutorial on 2D graphics and am playing with a class that creates a JFrame. Just for fun I want to print a message on a panel in the frame with the size of the frame after a user resizes the frame. As I have understood the tutorial, the method paintComponent is called eg. when the frame has been resized by a user.
However, in my code below, paintComponent seems to never be called after I resize the GUI. What am I missing ?