|
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.
|