repaint() Method in Java

The repaint() refreshes the view (component), so whenever you make any change on the component, you must call it. For instance, if you rotate the graphical component, you must make a call to repaint() in order to see the change on the containing component

paint() and repaint() in Java

I’ve spent maybe the last two hours browsing and reading up on these methods and the Graphics class, and maybe I’m stupid, haha, but I’m just not understanding them. What are they for? I understand that they’re supposed redraw or update components on the screen, but I have never understood why this is required (I’m … Read more