if(e.getSource()==btns[i]&&btns[i].getText()!="★"&&a[x1][y1]!=10) {
if(e.getButton()==MouseEvent.BUTTON3){ btns[i].setText("★");
b--;
if(b==0){
int flag=0;
for(int j=0;j<col*row;j++){ int x=j/col+1;
int y=j%col+1;
if(a[x][y]==100&&btns[j].getText()=="★"){
flag++; }
}
if(flag==bon){
timer.stop();
b3.setText("你赢了!"); }
}
b1.setText(b+"");
}
}else
if(e.getSource()==btns[i]&&btns[i].getText()=="★"&&a[x1][y1]!=-1){
if(e.getButton()==MouseEvent.BUTTON3){
btns[i].setText("");
b++;
if(b>bon){
b1.setText(bon+""); }
else{
b1.setText(b+"");
} btns[i].setEnabled(true);
}
}
}
}
}
}