在Java编程中,当我们操作图形用户界面(GUI)时,常常会用到`setDefaultCloseOperation(JFrame EXIT_ON_CLOSE)`或`setVisible(true)`等方