QuestionAsk Questions?

View Answers

June 24, 2009 at 11:52 AM

Hi Friend,

The Java class library provides the Applet class with default implementation for all the applet methods. You can implement these methods in the applet class when you want to override the default implementation of these methods. In your example, you are extending the applet1 class to Applet class, therefore the methods are already implemented.By defining the init(), start() and paint() method,you are overriding the applet methods. Therefore if you will haven't define the init() or start() methods, the paint() method can still be invoked.

Thanks

The Java class library provides the Applet class with default implementation for all the applet methods. You can implement these methods in the applet class when you want to override the default implementation of these methods. In your example, you are extending the applet1 class to Applet class, therefore the methods are already implemented.By defining the init(), start() and paint() method,you are overriding the applet methods. Therefore if you will haven't define the init() or start() methods, the paint() method can still be invoked.

Thanks

Related Tutorials/Questions & Answers: