In programming for our computer science game, we have a JFrame open displaying a panel which opens another panel in another JFrame. However, we can't get the second JFrame to close without closing the initial JFrame.
Setting the second panel invisible doesn't close the JFrame, but only closes the panel. We tried "frame.dispose()" in the first panel, but the problem is that the second JFrame closes immediately, before the second panel even does anything.
Preferably nothing too difficult to manage?
Thanks in advance!
Tags: