package dlg;
import javax.swing.*;
public class DlgTest {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null,"这是一个提示信息", "信息",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(null,"这是一个错误信息", "错误",JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null,"这是一个警告信息", "警告",JOptionPane.WARNING_MESSAGE);
JOptionPane.showMessageDialog(null,"这是一个问题信息", "问题",JOptionPane.QUESTION_MESSAGE);
JOptionPane.showConfirmDialog(null,"是否确认","请选择",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE);
}
}
![](https://img-blog.csdn.net/20180216200138629)
![](https://img-blog.csdn.net/2018021620015424)
![](https://img-blog.csdn.net/20180216200206224)
![](https://img-blog.csdn.net/20180216200217836)
![](https://img-blog.csdn.net/20180216200229587)