Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我编写了一个具有一个主窗口和多个对话框的应用程序,但是当用户单击右上角的“X”按钮时,其中一个对话框不会关闭。对话框中有一个确定按钮可以正确关闭它,所以这不是一个大问题。谁能建议为什么它不起作用?
也许你错过了这样一行: setDefaultCloseOperation(HIDE_ON_CLOSE); 在对话框类中?