Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to use achieve Thread.sleep behavior without freezing app?
How to use achieve Thread.sleep behavior without freezing app? [message #454891] Mon, 02 May 2005 00:02 Go to next message
Eclipse UserFriend
Originally posted by: aaa.domain.invalid

Hi,

My drawing application need to do the following 3 steps.
1.Display image 1.
2.Display it for "n" seconds
3.Display image 2.
So I display image 1, then do a Thread.sleep and then do a Display image
2. This freezes my system and am sure is not the right way to do this.
Can someone suggest a correct way of achieving this?

Thanks Chhil
Re: How to use achieve Thread.sleep behavior without freezing app? [message #454892 is a reply to message #454891] Mon, 02 May 2005 02:08 Go to previous messageGo to next message
Eclipse UserFriend
Look at the animated gif example, that should give you an idea:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet141.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

Emil

"Chhil" <aaa@domain.invalid> wrote in message
news:d5491s$fl3$3@news.eclipse.org...
> Hi,
>
> My drawing application need to do the following 3 steps.
> 1.Display image 1.
> 2.Display it for "n" seconds
> 3.Display image 2.
> So I display image 1, then do a Thread.sleep and then do a Display image
> 2. This freezes my system and am sure is not the right way to do this. Can
> someone suggest a correct way of achieving this?
>
> Thanks Chhil
Re: How to use achieve Thread.sleep behavior without freezing app? [message #454899 is a reply to message #454892] Mon, 02 May 2005 08:04 Go to previous message
Eclipse UserFriend
Originally posted by: aaa.domain.invalid

Hi Emil,

Thanks for the link...

I was doing a thread.sleep inside a display.asynchexec , instead I
created a new thread and went to sleep inside it (as the example does),
the app does not freeze up.

-chhil

Emil Crumhorn wrote:
> Look at the animated gif example, that should give you an idea:
>
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet141.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup
>
> Emil
>
> "Chhil" <aaa@domain.invalid> wrote in message
> news:d5491s$fl3$3@news.eclipse.org...
>
>>Hi,
>>
>>My drawing application need to do the following 3 steps.
>>1.Display image 1.
>>2.Display it for "n" seconds
>>3.Display image 2.
>>So I display image 1, then do a Thread.sleep and then do a Display image
>>2. This freezes my system and am sure is not the right way to do this. Can
>>someone suggest a correct way of achieving this?
>>
>>Thanks Chhil
>
>
>
Previous Topic:explaining Jar-files
Next Topic:ToolItem SelectionEvent
Goto Forum:
  


Current Time: Fri Nov 07 14:37:07 EST 2025

Powered by FUDForum. Page generated in 0.04804 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top