Forums Register Login

About swing I have some question to ask

+Pie Number of slices to send: Send
(1): As everybody know, this is thread unsafe to access or operate the swing component(such as Jbutton, JLabel) directly, so we usually need to invoke the code within invokeLater or invokeWait method, So Does all eventsDispatch code, invokeLater and invokeWatit code run the same thread?

(2): SwingWorker is used to do some extra and time-overing work, if there also have some operate the component code in swingworker, the SwingWorker will excute this code by events Dispatch thread automatically, So Does need wait the code run finished actuallly also is the component updated succusslly then run next code? or not?

(3): every SwingWorker instance is start is mean to a new thread start, right? but eventsDispatch thread always is only one thread running whole java application alive process?
+Pie Number of slices to send: Send
Please read this.
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 578 times.
Similar Threads
EventQueue Dispatching
Getting data from a Thread
Applet question
How to return a result to the invoking method from another thread?
flush JTextArea immediately
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:20:01.