According to me you use it the same way as in an Application..
You can create a thread in on of two ways ...
* Extend java.lang.Thread
You can then use your class in the following wa :
MyThread mt = new MyThread();
mt.start();
* Declare a class that implements the Runnable interface :
Thread runner;
class MyThread implements Runnable {
public void run() {
if (runner == null) {
runner = new Thread(this);
runner.start();
}
}
}