• Post Reply Bookmark Topic Watch Topic
  • New Topic

About swing I have some question to ask

 
jammy chen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(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?
 
Campbell Ritchie
Marshal
Posts: 52580
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!