错误太多了吧,主要是两点:
1、Button b1=new Button("MC");
Button b2=new Button("MR");
等等都应该被放在init方法外面。
2、e.getActionCommand()==bxx这种东西……
e.getActionCommand()返回的是一个String,bxx是一个Button,两者用==比较……自己想想为什么不对吧……
1、Button b1=new Button("MC");
Button b2=new Button("MR");
等等都应该被放在init方法外面。
2、e.getActionCommand()==bxx这种东西……
e.getActionCommand()返回的是一个String,bxx是一个Button,两者用==比较……自己想想为什么不对吧……
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货