开发者

Java: deploying one method before continuing with the rest

Hey guys, I'm kinda new to Java.

Lets say I have two methods, spinner() and loadEverything(). I want to execute spinner() first and have 开发者_如何转开发it run while loadEverything(), which is kinda heavy, is finishing. I've tried but no matter what I do the applet loads everything before rendering spinner().

Best regards, Ulrik

Thanks to: baphomet13, sovled my problem.


If I understand correctly, you want your spinner method to be run in parallel with the loadEverything method. For two methods to be executed in parallel, you need threads. But threads must respect some hard rules when used inside a Swing application or applet. Read the tutorial on concurrency in Swing for explanations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜