swing中的messageBox测试

import java.util.*;

import java.io.*;

import javax.swing.JOptionPane;

class Test //对话框测试

{

public static void main(String[] args) 

{

JOptionPane.showMessageDialog(null,"输入错误类型!","错误",JOptionPane.ERROR_MESSAGE);

JOptionPane.showMessageDialog(null,"恭喜,登录成功!","提醒",JOptionPane.INFORMATION_MESSAGE);

JOptionPane.showMessageDialog(null,"系统泄漏啦!","警告",JOptionPane.WARNING_MESSAGE);

JOptionPane.showMessageDialog(null,"1+1=?","提问",JOptionPane.QUESTION_MESSAGE);

 

}

 

}

你可能感兴趣的:(java)