日期:2014-05-20 浏览次数:20723 次
Object[] possibilities = {"XXOO", "XXOO", "XXOO" };//这里随便写,yes,no了 int n=JOptionPane.showOptionDialog(null, "请选择你喜欢的","XXOO",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,icon,possibilities,possibilities[0]); String s=”XXOO”; switch(n){ case 0: s=s+”XXOO”; break; sase 1: s=s+"XXOO"; break; sase 2: s=s+”XXOO”; break; default: s=”XXOO”; } JOptionPane.showMessageDialog(null,s,"XXOO", JOptionPane.INFORMATION_MESSAGE); System.exit(0); }