posted 10 years ago
Mona,
It's always good to separate the code into different modules. UI creation can be in one function, list initialization can be in a different function, and network connectivity (as you have mentioned you are using network stream) can be in a different class altogether.
Correct me if I am wrong. As far as the exceptions are concerned, without looking how are integrating the things it's tough to find out whats going wrong.