Results 1 to 2 of 2
- 04-23-2011, 03:41 PM #1Member
- Join Date
- Nov 2010
- Rep Power
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?
There's no single one-size-fits-all answer but rather it depends on the structure of your program more than anything.
- By egbert95 in forum New To JavaReplies: 4Last Post: 07-29-2010, 02:53 PM
- By egbert95 in forum Advanced JavaReplies: 8Last Post: 07-29-2010, 02:53 PM
- By mneskovic in forum New To JavaReplies: 3Last Post: 07-23-2010, 12:50 PM
- By xclaim in forum New To JavaReplies: 2Last Post: 11-26-2009, 02:33 AM
- By Laythe in forum New To JavaReplies: 6Last Post: 08-19-2009, 08:32 PM