01-14-2004, 01:34 PM
|
Intellectual
Join Date: Jul 2003
Posts: 211
|
|
Begnner Java Question!
Hi everyone,
I am posting this here after not getting a responce in a "programming forum". I, however always get help here.
Anyways, it is very simple.
I have a program (Break Out) running in JFrame with a Thread (Runnable) etc and I want to make a method that when called resets the whole program, meaning that it disposes the current window and then calls the main method to start a fresh window of the application. How do I go about doing this?
I need this for this game I have written, and I have tried resetting all my variables when the user clacks "replay" at the end to start a new game, but somehow things just don't function properly and I need to just start a fresh new window... is this even possible (calling the main() of a class from within the class and disposing the current window and replacing it by a new one??)
Any help will be greatly appreciated.
|
|
|
|
|
|
|
|