if(thread1.isInterrupted()){
thread1.interrupted();//a
thread1.start();}
else
thread1.interrupt();//b
a,b两个地方有点矛盾吧。
使用stop(),在MyFrame里设置一个boolean变量来监控。
thread1.interrupted();//a
thread1.start();}
else
thread1.interrupt();//b
a,b两个地方有点矛盾吧。
使用stop(),在MyFrame里设置一个boolean变量来监控。
解决方案 »
- eclipse-visualeditor
- Thread 有一构造方法是private exit(); 好象任何线程结束时都要调用,是不是??
- JAVA基础知识测试题
- 高分求:怎么把字符串的内容作为另外一个类的引用 !各路高手来看看啦!!
- 将GZIPOutputStream改为ZipOutputStream,请高手之招!在线,解决马上结帖
- 框架,模式???
- 一个关于swing的问题!!
- 非常急的问一下:.class文件怎么才能看见?
- 请大家谈一下JAVA的学习经验,如何能打下扎实的基础?
- 求助,读property配置文件
- 菜鸟问题:java如何进行字符处理?
- 熟悉GUI编程的兄弟姐妹请进!!!!!
thread1.wait();
isRunning = false;
}else {
thread1.notify();
isRunning = true;
}