GWT Sleep

2,999 views
Skip to first unread message

Tapas Adhikary

unread,
Apr 5, 2010, 1:00:23 AM4/5/10
to Google Web Toolkit
Hi All,

I would like to show an image for the specified time in the UI. I need to give an good amount of delay between user action and the next UI refresh.In GWT,  I am looking for something like a Thread.sleep(SPECIFIED_TIME) as it is in Java. Is there any similar method exist to achieve ? I know there is something called Timer , but can anybody help me with code to demonstrate how it works ?

Thanks in advance ,
-Tapas

kozura

unread,
Apr 5, 2010, 1:50:36 AM4/5/10
to Google Web Toolkit
Plenty of examples under the Timer documentation
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsDelayed.html.
You never "sleep", which in java stops all activity in a thread, but
instead set up an action which asynchronously occurs in the future.

Tapas Adhikary

unread,
Apr 5, 2010, 2:47:39 AM4/5/10
to google-we...@googlegroups.com
So , if I want to force some delay I can use Tmer's schedule method .isn't it ?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Alexander Krasnukhin

unread,
Apr 5, 2010, 7:04:04 AM4/5/10
to google-we...@googlegroups.com
Yes
--
Regards,
Alexander

Reply all
Reply to author
Forward
0 new messages