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);

 

}

 

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章