0

When I open a new JFrame, I set the old one as false:

ExampleJFrame.this.setVisible(false);
ExampleNewJframe newOne = ExampleNewJframe();
newOne.setVisible(true);

But If I am in newOne, how do I get back to the original Frame without creating a new as I did above?

Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373

1 Answers1

1

The best solution: don't go swapping JFrames; that's can be a rough design that can annoy users. Instead swap JPanel "views" using a CardLayout as per The Use of Multiple JFrames, Good/Bad Practice?.

Community
  • 1
  • 1
Hovercraft Full Of Eels
  • 283,665
  • 25
  • 256
  • 373