延迟线程执行
Timer timer=new Timer();//实例化Timer类
timer.schedule(new TimerTask(){
public void run(){
buyed(true);
this.cancel();}},500);
延迟线程执行
Timer timer=new Timer();//实例化Timer类
timer.schedule(new TimerTask(){
public void run(){
buyed(true);
this.cancel();}},500);