So I have two JFrames. If I press a button I want to make the main frame disappear, and the new frame to appear. But when I close the new frame, I want to make the old frame reappear. The first part I cant do it with a simple:
mainFrame.setVisible(false);
newFrame.setVisible(true);
But I want to make the main frame reappear again after I close the new frame. I use DISPOSE_ON_CLOSE on the new frame by the way.