1.

How To Handle A Web Browser Resize Operation?

Answer»

You KNOW how important it is to suspend your threads when Java calls an APPLET's stop method. Normally, Java calls the stop method when a browser leaves the corresponding Web page. However, in some cases, a Web browser will unexpectedly call an applet's stop method. When a browser window is resized, the browser may first call the stop method and then the START method. If you only stop a thread when its applet stops and create a new thread when the applet restarts, the applet will probably not behave the way that a user expects. To prevent unwanted behavior after RESIZING the browser, your PROGRAM should suspend threads when the applet stops and resume the threads when the applet starts.

You know how important it is to suspend your threads when Java calls an applet's stop method. Normally, Java calls the stop method when a browser leaves the corresponding Web page. However, in some cases, a Web browser will unexpectedly call an applet's stop method. When a browser window is resized, the browser may first call the stop method and then the start method. If you only stop a thread when its applet stops and create a new thread when the applet restarts, the applet will probably not behave the way that a user expects. To prevent unwanted behavior after resizing the browser, your program should suspend threads when the applet stops and resume the threads when the applet starts.



Discussion

No Comment Found