Hi,
I have one thread, inside which I am calling a method.
Inside that method I am calling another thread to show a message to user if some exception occurs.
Now the problem is that the message is disappearing without being visible to the user(Its like flash). The control is not staying on the message modal window(it should stay there). I am not able to find the exact problem.
Is the previous thread is completing before the current thread. If this is the case then what could be the solution.
thanks and regards,
Amit
I have one thread, inside which I am calling a method.
Code:
new Thread(new Runnable() { public void run() { InvoiceVO returnedInvoiceVO = finalizeHandler.postAndPrint(); : : }
Code:
protected InvoiceVO postAndPrint() { InvoiceVO returnedInvoiceVO = null; try { returnedInvoiceVO = InvoiceBL.printInvoice(invoiceVO, customerVO); } catch (final ApplicationException aerr) { SwingUtilities.invokeLater(new Runnable() { public void run() { clientApplicationContext.getMessageMgr().showMessage(finalizeDialog, aerr.getUserMessageID(), aerr.getUserMessageParameters(), 7); finalizeDialog.lblErrorMsg.setText(""); } }); } return returnedInvoiceVO; }
Is the previous thread is completing before the current thread. If this is the case then what could be the solution.
thanks and regards,
Amit
Comment