JAVA中的消息提示框

JAVA 中提供如下消息提示框:

      注意:如果报newFrame.getContentPane(),错误,则修改为null 即可

     JOptionPane.showMessageDialog(newFrame.getContentPane(),
       "弹出的是消息提示框!", "系统信息", JOptionPane.INFORMATION_MESSAGE);
     JOptionPane.showMessageDialog(newFrame.getContentPane(),
       "弹出的是警告提示框!", "系统信息", JOptionPane.WARNING_MESSAGE);
     JOptionPane.showMessageDialog(newFrame.getContentPane(),
       "弹出的是错误提示框!", "系统信息", JOptionPane.ERROR_MESSAGE);
     JOptionPane.showMessageDialog(newFrame.getContentPane(),
       "弹出的是询问提示框!", "系统信息", JOptionPane.QUESTION_MESSAGE);



你可能感兴趣的:(java)