先定义一个boolean的变量!
然后在鼠标事件中:
flag=!flag;
if(flag){
jButton1.setText("BIG");//设置你的状态1
}
else
{
jButton1.setText("Small");//设置你的状态2
}
然后在鼠标事件中:
flag=!flag;
if(flag){
jButton1.setText("BIG");//设置你的状态1
}
else
{
jButton1.setText("Small");//设置你的状态2
}
调试欢乐多
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货