我在使用Jdialog时第一次点击关闭按钮不成功,点击两次才成功关闭该窗口。
This is a modal dialog, so the requestFocus and setVisible lines are not executed until the dialog closes,
then, when closed, setVisible(true) is executed.
即窗口在close时会执行setVisible
我尝试删除了代码里的
setVisible(true);
问题解决!