I've spent the last hour searching on Google to try and achieve something - preventing the closure of my main interface after one of the others is closed. I'm not sure if this is the correct way to word my question, so apologies for the confusion if there is any.
I have one interface called MainUI, which is the main interface for starting my Java program. On this interface is two buttons that opens two other interfaces (SinglePlayerStatsUI and MultiplePlayerStatsUI). If I click on either button, it opens the appropriate interface (as it should), but when I close the opened interface it also closes the main interface (MainUI) - which isn't what I want. I am wondering what would be a good solution to stop the main interface from closing (which is also the main class of the program)?
To save some space in this question, I have my Java project on GitHub (created in NetBeans) at https://github.com/rattfieldnz/Java_Projects/tree/master/PCricketStats. The class file for the MainUI is called "MainUI.java", the class for SinglePlayerStatsUI is called "SinglePlayerStatsUI.java", and the class for MultiplePlayerStatsUI is called "MultiplePlayerStatsUI.java". These classes are located in https://github.com/rattfieldnz/Java_Projects/tree/master/PCricketStats/src/pcricketstats.
I have screenshots of each interface also - these can be seen at https://i.stack.imgur.com/LwZ9l.jpg.
If my question needs more clarification, please let me know.