2
我在另一个框架中创建了第二个框架。 我注意到当我关闭第二帧时,第一帧也关闭了。关闭/退出没有关闭父框架的子框架
我该如何避免这种情况? 我希望第一帧保持原样并且不关闭。
我的第二帧代码:
JFrame.setDefaultLookAndFeelDecorated(true);
frame = new JFrame();
frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE); //when it closes the first frame closes too
感谢
可能的复制[而不关闭另一个关闭一个的JFrame?](http://stackoverflow.com/questions/ 1944446/close-one-jframe-without-closing-another) – Blasanka