Java – multiple swing event dispatch threads

I want to create a new event dispatch thread in swing, but I can't find any references online about how to do this I create a new thread and call application Run (...) in Net Has anyone ever done this? Is it possible in swing?

For reference only, I do this because I am writing an eclipse plug-in. I want to pop up some dialog boxes that are not ide mode, but they are the mode (blocking) of my UI logic I can do this using modeless dialogs and callbacks, but this requires the overhead of multithreading my code If the former is impossible, I will go back there again

Solution

Yes, it is possible I have completed such multiple EDT scheduling thread logic in swing However, the end result is that it cannot work reliably

(a) All JVMs cannot work well with multiple EDT threads (synchronization problems in graphics rendering logic in native code, etc., IBM JVMs fail due to multiple EDT threads, and sun JVMs and apple JVMs are indeed effective)

(b) Swing rendering logic has few errors that cause random rendering errors to occur (for example, http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6727829 ).

In any case, this requires basically two appcontexts, each of which has its own EDT thread

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>