View Single Post
Old Apr 2nd, 2008, 9:12 AM   #1
namsu
Newbie
 
Join Date: Jan 2008
Posts: 15
Rep Power: 0 namsu is on a distinguished road
How to return to an instance?

I am having a problem. If I have a JFrame open in a class and it performing and processing, when I close it, it still performs the work, which is good because this is what I want it to do. How do I actually return to that instance of the running program, if I go back to the main menu and click the button to load it up again, it makes a brand new instance. I need to return to the already running one.

Code for the back button

MainMenu m = new MainMenu();
m.setVisible(true);
dispose();

Code for loading up JFRAME Again from Main Menu

SandHopper sHopper = new SandHopper();
dispose();
sHopper.setVisible(true);

If someone can help me out here it would be great. Thank you.
namsu is offline   Reply With Quote