JOptionPane.showConfirmDialog(Component parentComponent, Object message)
          Brings up a modal dialog with the options Yes, No and Cancel; with the title, "Select an Option".

解决方案 »

  1.   

    //看看这:
    http://www.csdn.net/expert/topic/88/88754.shtm
    显示的信息,如异常等。可以存如string 中,然后用把它显示在jpanl上。
      

  2.   

    弹出对话框的例子:
    JOptionPane.showMessageDialog(null,"Please check error!","Title---->Error!",JOptionPane.ERROR_MESSAGE);该例子调用了JOptionPane的静态方法:showMessageDialog;JOptionPane还有另外三个静态方法,也是用于弹出对话框。(showConfirmDialog,showOptionDialog,showInputDialog)