about halting paintComponent() on window resize
when using Java Swing. What would be the way to halt the paintComponent() from being called when the frame gets resized/minimized/extended
Basically the default model is paintComponent() gets called at the start but also upon window resizing. This is why the graphics disappear upon any manipulation of the frame.
I tried asking Perplexity Pro but I was not able to implement running any of these options of code.



1 Reply
⌛ This post has been reserved for your question.
Hey @SidKid! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.