public class ShowStatusThread implements Runnable { Thread showStatusThread = null; Label label = null; GC gc = null; boolean start = true;
boolean wait = false; public ShowStatusThread(Label label, GC gc, int thread_priority, String name) {
showStatusThread = new Thread(this);
showStatusThread.setPriority(thread_priority);
showStatusThread.setName(name);
this.label = label;
this.gc = gc;
} public  void run() {
while (start) {
if (wait == true) {
synchronized (showStatusThread) {
try {
showStatusThread.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
} else {
ReadCardView.paintWaitingPic(label, gc);
try {
showStatusThread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
} public void start() {
if (this.showStatusThread != null) {
this.showStatusThread.start();
}
} public void stop() {
State s = showStatusThread.getState();
if (State.WAITING.equals(s)) {
 showStatusThread.interrupt();
System.out.println(showStatusThread.getState()); } else {
this.start = false;
}
} public void notify_self() {
synchronized (showStatusThread) {
showStatusThread.notifyAll();
System.out.println(showStatusThread.getPriority());
this.wait = false;
}
} public void wait_self() {
this.wait = true;
} public String getName() {
return this.showStatusThread.getName();
}
}
如上代码 线程启动后
我首先调用wait_self() 方法 让线程进入WAIT状态
然后再调用stop() 方法 想让它停止
结果抛出了:
java.lang.InterruptedException求教怎样解决?