Close a JFrame, but keep the original open.
I have a JFrame called FinancialGUI. It has a button that, when clicked, creates a new JFrame called EditPayPeriodGUI. When I exit EditPayPeriodGUI, the entire application closes, but I only want the EditPayPeriodGUI to close. I do have setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) which I'm sure I shouldn't have. But what else do I need to put?
Instead of using JFrame.EXIT_ON_CLOSE, I used JFrame.DISPOSE_ON_CLOSE which gave me the desired result.