Hi All, Getting a problem. Usually in destroy() method, we people free all the resources that were in use by the applet and then closes the JVM by calling System.exit(0). But then, its raising a security exception ?? If I dont call System.exit(0), then there is no exception, but I have several threads running in applet, so in destroy I wanna kill the thread. Consider this : I have a chat applet running. Now for every user that connects to the chat applet, the applet creates a new thread. When one of the client wishes to leave the chat applet, I wanna kill the thread for that particular client. How this is going to achieve. Kindly help. !!! Regards & all the best,
Best wishes,
Val Dra
Ranch Hand
Joined: Jan 26, 2001
Posts: 439
posted
0
in your destory method of applet just check if the running thread is not null and then just set it to nul it's a nice way to do it. It will kill your thread.