05-28-2012 09:57 AM
I may have said the wrong thing earlier. The code that should all be in the invokeLater is this code:
Status.show("Hey there is no network connection!!!");
Status.show("Something is not right here.\nPlease try again later.");
ListCallBack callback = new ListCallBack();
05-29-2012 01:46 AM - edited 05-29-2012 01:53 AM
Thanx for the help. It works. There is one more problem. Alongwith the posted code there is one more thread from which i am drawing bitmaps on each row of listfield asychronously. In this case,when screen is displaed, its gets hang until images are fetched from web,if i use this thread with the thread you have suggested. how to overcome this problem?
05-29-2012 04:09 AM
"its gets hang until images are fetched!"
This suggests that there is processing running on the Event Thread, blocking the screen. So that is the first thing to look for
If the Thread is running on a separate Background Thread, then look at the coding you do while updating the UI from that Thread. You should minimize this. For example, if you need to convert the bytes received to images, that processing does not need to be done on the Event Thread and can be done as part of the Background Tread processing.