Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / August 2004

Tip: Looking for answers? Try searching our database.

SWT(JFace) UI update from worker thread

Thread view: 
Wongoo Lee - 29 Jul 2004 00:34 GMT
Hello.

I'm writing a JFace & SWT application. It has a worker thread who does
some periodic data checking. If it detects some changes on the data,
the UI should be refreshed.

But SWT's UI mechanism is not allowed to call 'refresh' method from
other threads than UI thread. (It raises SWT exception.)

How can I solve this problem?

----

Is there any way to make periodic jobs in the UI thread? (like windows
WM_TIMER message)

Thanks in advance.

iwongu
Dick Wad - 01 Aug 2004 14:15 GMT
You can use syncExec() and asyncExec().  Use timerExec() to get WM_TIMER messages.

Dick
javaswing - 05 Aug 2004 03:47 GMT
You can see this article
http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/org.eclipse.pl
atform.doc.isv/guide/swt_threading.htm


you must use another thread to update your ui...^_^


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.