
Originally Posted by
njzk2
you don't need your process to wait until a thread completes, since all display methods are non-blocking.
basically, you probably will have to do with another type of screen to display the message, probably a Form, with a command and a command listener to actually quit
Code:
if(c==exitCommand){
th = new Thread() {
public void run() {
Alert alert=new Alert("","dds",null,AlertType.CONFIRMATION);
alert.setTimeout(5000);
//display.setCurrent(alert, loginForm);
}
};
th.start();
while (!th.isAlive()) {
// Thread has not finished
/* Alert alert=new Alert("","dds",null,AlertType.CONFIRMATION);
alert.setTimeout(1000);
display.setCurrent(alert, loginForm);*/
// Finished
quitApp();
}
i tried that not giving error but also doesn't work doesn't quit