The
Sun Conurrency Tutorial is pretty good, too.
In short
0) Read the tutorial or Thinking in
Java.
1) Write a class that implements the Runnable interface. Put the guts of the work to be done in the run() method, pass any data required to do the job to the constructor.
2) Do something like this:
When it comes time to get data back from the
thread or make two threads interact with each other, things get trickier. The Sun tutorial will get you there. BTW: This all got much easier in Java5. If you're in an older JDK, see if you can get up to Java5.
Let us know how you make out!