Hi,
I want to update my gui and thereafter I want to execute a thread. But the thread is always executed before the gui is updated by the program. Here is my code:
public void getWaitTime()
{
WaitThread t = new WaitThread();
t.start();
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
}
try {
t.join();
} catch (java.lang.InterruptedException e) {}
this.proceedUser();
}
public void proceedUser()
{
if( check the db if this case is allowed )
{
labelWaitMessage.setValue("Just wait some minutes...You are being redirected.");
l1.addComponent(getUserWaitView(buttonUpdateView,labelWaitMessage));
getWaitTime();
}
}
How can I change the gui with l1.addComponent(…) and after this execute the thread?