。。。
the long-running task in this program runs in a separate thread. Generally, it's a good idea to isolate a potentially long-running task in its own thread so that the task doesn't block the rest of the program. The long-running task is implemented by LongTask.java, which uses a SwingWorker to ensure that the thread runs safely. See Using the SwingWorker Class in Threads and Swing for information about the SwingWorker class.
。。。
三个源文件:
SwingWorker.java (sun 提供)
LongTask.java
ProgressBarDemo.java作者: elgs 时间: 2003-01-31 15:31 标题: 请问??? Thank you very much. I will give a try!作者: elgs 时间: 2003-01-31 21:31 标题: 请问??? 果然好了, 把它放在一个单独的线程里, 一切看上去好极了! 谢谢 :)