How to stop the auto-repaint() when I resize the Jframe
I am still learning Java, if someone can help me I will be very happy! Sorry for bad english, I am spanish! I am making a tile game, the game uses the classic "game loop" that cap the engine at 60fps The loop sleep and then call repaint(); This works fine! But.. The problem is that repaint event is called when the JFrame is resized or maximized! For example when the JFrame is maximized/resized the game render at 10000fps but when they dont, the game render at the speed I set, so there is a way to disable Automatic repaint and make it work ONLY when the "component.repaint()" is called from my