![set applet viewer size set applet viewer size](https://i0.wp.com/programmingdigest.com/wp-content/uploads/java-applet-output-in-web-browser.png)
![set applet viewer size set applet viewer size](https://cdn.shopify.com/s/files/1/1192/3640/products/JW-93_1acffa64-dfc4-45c3-bee7-c62ec2dd0033_3161x.jpg)
The destroy( ) method is called when the environment determines that your applet needs to be removed completely from memory.Methods declared in class java.awt.Once applet is destroyed we can’t start() the applet (we cannot restore the applet again).destroy() method is used to destroy the application once we are done with our applet work.You can restart them when start( ) is called if the user returns to the page. You should use stop( ) to suspend threads that don’t need to run when the applet is not visible. The stop( ) method is called when a web browser leaves the HTML document containing the applet when it goes to another page, for example, when stop( ) is called, the applet is probably running.This method mainly deals with clean up code.After stop()method called, we can also use start() method whenever we want.It is invoked every time the browser is stopped, minimized or when there is an abrupt failure in the application.Note: This is the only method among all the method mention above, which is parameterized.
![set applet viewer size set applet viewer size](https://docs.oracle.com/cd/E14004_01/books/ConfigApps/images/chtview.gif)
Syntax: public void paint(Graphics graphics) This parameter will contain the graphics context, which is used whenever output for the applet is required.paint() method has one parameter of type Graphics Class, this Graphics class enables the painting features in an applet.paint() method is used for painting any shapes like square, rectangle, trapeziums, etc.when the first time an applet is loaded whereas start( ) is called each time an applet’s HTML document is displayed onscreen. ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.