取消掉关闭方式的声明,即不能存在以下语句: setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//设置窗体关闭方式 全部注释掉就可以实现子窗口关闭母窗口依然存在了