小作

来源:互联网 发布:elementary 安装软件 编辑:程序博客网 时间:2024/06/10 15:21
package oneday;


import javax.swing.JOptionPane;


/**
 * @author Administrator
 *
 */
public class Hwlloworld {
public static void main(String arg[]){

System.out.println("welcome");
Hwlloworld he=new Hwlloworld();
he.joptionDi();
}
void joptionDi(){
int a=0;
while(true){
Object[] obj={"是","否","不確定"};
//JOptionPane.showMessageDialog(null, "welcome!");
int i=JOptionPane.showOptionDialog(null, "略略略!","不回答就死循環系列",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,obj,obj[1]);
if(i==0)
{

JOptionPane.showMessageDialog(null, "你以為點是就行了?更不存在的");

}
else if(i==1||i==1)
continue;
else if(i==-1)
{
a++;
if(a==1)
JOptionPane.showMessageDialog(null, "你以為×掉就行了?不存在的");
else if(a==2)
JOptionPane.showMessageDialog(null, "都跟你說了點×沒用,還點");
else
JOptionPane.showMessageDialog(null, "你還真是不死心");
continue;
}

}
}
}
原创粉丝点击