Summary
This tutorial has given you a broad coverage of working with MIDlets that communicate over a network connection. The intention was to focus on the importance of using threads and writing code to demonstrate how to do so.
You started the tutorial by writing a non-threaded MIDlet that would retrieve quotes from a remote server. The reason for developing this application was to show the problems associated with network access from a MIDlet that did not use a separate thread for communication. I demonstrated how the user interface blocked while waiting for a network connection to complete.
In the second section of this tutorial, I introduced threading. This included a discussion of the two threading techniques available in the Java language: creating a class that subclasses Thread, and implementing the Runnable interface. In this section, you also studied how J2ME threads differ from those available within J2SE.
The final section was dedicated to creating a multithreaded MIDlet. As in the previous section, I began with a series of screenshots to demonstrate the MIDlet you were about to write. This included showing how the multithreaded MIDlet could download more than one image at a time. I wrote the code to make it happen, and concluded with a comprehensive discussion of each aspect of the program.
Hopefully, you now have a good appreciation of why writing multithreaded applications is so important. You also have a starting point for building more comprehensive MIDlets that can use threading to increase the useability of your applications.

