System.exit(0);
没做判断
应该有一个语句
if(退出的判断成立)
就contiue;
else 
System.exit(0);

解决方案 »

  1.   


           if (JOptionPane.showMessageDialog(this,"谢谢使用本软件!","",
                                     JOptionPane.INFORMATION_MESSAGE
                                     )==0){
                           System.exit(0);
                           }
          }
      

  2.   

    1、setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE )
    2、使用addWindowListener方法监听退出事件WINDOW_CLOSINGJFrame默认的Close处理为The value is set to HIDE_ON_CLOSE by default.你们的程序在processWindowEvent完之后窗口都会hide的