I am facing a issue with implementing back button functionality.
I have 2 frames (Main Frame and Second Frame), so when i press a button on Main frame it takes me to second frame. On the second frame i have a back button it takes me back to the main frame. This is working as expected. But the problem is that once i am back on the main frame after pressing the back button all the alignment of the main frame goes away.
On Main frame i have below code to goto second frame:
frame.dispose();
frame.setVisible(false);
WebAppTest object = new WebAppTest();
object.createAndShowGUIWebAppTest();
On the second frame i am using below code to go back to main frame:
MainLanding object = new MainLanding();
object.createAndShowGUIMainLanding();
frame1.dispose();
frame1.setVisible(false);