What is the proper way to stop the thread ? Thread.stop() is deprecated and furthermore doesn't seem to work corectly. Help please !