aspose file tools*
The moose likes Threads and Synchronization and the fly likes Thread Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Thread Problem" Watch "Thread Problem" New topic
Author

Thread Problem

erdem ozdemir
Greenhorn

Joined: Aug 09, 2005
Posts: 15
hi all o/

I am not much experienced in threads, I have a problem in threads.


Here, I have a label which is like a button. When I call e.go(), I actually start a timer object in my extended label to start an animation in it. Here is the code that starts animation.



My problem here is that, it performs part in belowe before showing me animation. I think when I call sleep of thread in label object, it comes back to codes in panel and continues there. Then it completes animation but I can't see animation because panel of main screen has already changed.
am I right?



I could not find any solution to this so far. Any help will be appreciated in advance.

Sincerely

[ September 28, 2006: Message edited by: erdem ozdemir ]
[ September 28, 2006: Message edited by: erdem ozdemir ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Let's see the code for "e.go()" before I tell you what's wrong. There are at least two possibilities that I can think of.


[Jess in Action][AskingGoodQuestions]
erdem ozdemir
Greenhorn

Joined: Aug 09, 2005
Posts: 15

here is go part in extended label.
If i remove that if/else part in MouseClicked function, I can see animation which is actually a flash of colors.

Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Thread Problem