How do I stop the program but not exit the JFrame?
I am making a game in Java and my GUI is JFrame. I use the paintComponent ( Graphics g ) method to draw and I use the ActionListener to do sprite movement etc.
If i lose or win the game, i show a different background suitable for the condition. I want the game to stop after this. I used debugger and it shows the my program runs every after i show to background. Is there a method i can call to stop the execution and just show that background until user exits?