I'm having trouble with Runnable :crying: one more time. I have this piece of code in my class:
if(success){
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Congratulation congratulation = new Congratulation();
congratulation.setVisible(true);
/*try {
Thread.sleep(3000);
congratulation.dispose();
} catch (InterruptedException e) {}*/
}
});
As it is (Thread.sleep() commented) working fine. But when trying to have 3 sec and after this dispose() my image on congratulation Frame not displayed, :confused: but I can see the Frame that created.
Please help
Thank you,
toto7


Sign In
Create Account


Back to top









