SwingWorker与线程 [英] SwingWorker vs Threads

查看:135
本文介绍了SwingWorker与线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Java-ites:

我正在通过21天的自学Java工作,我刚刚完成了关于SwingWorker的章节,但我对这个差异感到困惑(如果它之间有一个使用Thread类。有人可以澄清吗?谢谢。



Dre

Hello Java-ites:
I'm working my way through Teach Yourself Java in 21 Days and I've just completed the chapter on SwingWorker, but I'm confused about the difference (if there is one) between it an using the Thread class. Can someone clarify? Thanks.

Dre

推荐答案

它只是帮助您使用事件调度线程的。这里解释了一切:

http://en.wikipedia.org/wiki/SwingWorker [ ^ ]。



只是一个注释:你的问题是一个简单事实的例证:关于差异的问题通常在逻辑上无效。如果您不明白为什么,请告诉我们苹果和Apple之间的区别。



-SA
It just helps you to use an event dispatching thread. Everything is explained here:
http://en.wikipedia.org/wiki/SwingWorker[^].

Just a note: your question is one of the illustration of the simple fact: the questions about "difference" are usually logically invalid. If you don't see why, please tell us the difference between apple and Apple.

—SA


谢谢Sergey 。我快速浏览了一篇关于花时间学习发展的文章,从我读到的内容我不得不说我同意这篇文章,但不幸的是,当你失业,你的失业救济金即将耗尽时,你必须尽你所能才能成为可销售的。



我将看一下维基百科的文章。我只是问,因为我不确定它是否只是冗余,或者是否一种方法比另一种方法更受欢迎(招聘经理倾向于在面试时询问这些事情,我喜欢做好准备)。



感谢您的反馈。



Andre
Thank you Sergey. I took a quick look at the article about taking time to learn development, and from the bit I read I have to say I agree with the article, but unfortunately when you're unemployed, and your unemployment benefits are about to run out, you have to do what you can to become marketable.

I will take a look at the wikipedia article. I only ask because I wasn't sure if it was just redundancy or if one method was preferred over another (hiring managers tend to ask those sorts of things on interviews, and I like to be prepared).

Thanks for the feedback.

Andre


这篇关于SwingWorker与线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆