Results 1 to 2 of 2
- 04-23-2011, 03:41 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 54
- Rep Power
- 0
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.
Similar Threads
-
Could not find main class: Jframe. Program will exit.
By egbert95 in forum New To JavaReplies: 4Last Post: 07-29-2010, 02:53 PM -
Could not find main class: Jframe. Program will exit.
By egbert95 in forum Advanced JavaReplies: 8Last Post: 07-29-2010, 02:53 PM -
Use stop button to stop moving (stop timers) on JPanel
By mneskovic in forum New To JavaReplies: 3Last Post: 07-23-2010, 12:50 PM -
how to stop/exit the mediabox JAVAFX
By xclaim in forum New To JavaReplies: 2Last Post: 11-26-2009, 02:33 AM -
How to exit the program by typing "exit"?
By Laythe in forum New To JavaReplies: 6Last Post: 08-19-2009, 08:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks