Animation Delay - Swing EDT problem |
|
| Comments (1) |
|
Justin in Auckland, New Zealand 62 months ago |
this probably turns out a stupid question, but it's been driving me crazy. so PLEASE help out Basically what I want is when the sign in button is clicked, the glass pane is turned on, shows some animation and when the rest done, turn it off. because the rest is alot and so I put it in another thread. The problem is that when the button is clicked, the classPane is turned on (like I expected), but the animation doesn't start immediately, Its only starts when the rest in another thread has finished (but at that point, the glasspane is already turned off). So what I have is just an image doing nothing and then disapears This is the code btnSignIn.addActionListener(new ActionListener()
getupGlasPane.setVisible(true); //expected the glassPane shows (it does), and the animation starts (it doesnt) new Thread(new Runnable() //The animation only starts when this thread finished
Is there a way I can force the animation starts immediately before the other thread starts? Thank you so much |
» Sign in or create an account to comment on this topic.
