Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   why we have to extends applet class in applet program (http://www.go4expert.com/forums/extends-applet-class-applet-program-t28109/)

mahesh@maahi 29Mar2012 10:40

why we have to extends applet class in applet program
 
plz ans me some one

state 19Apr2012 11:27

Re: why we have to extends applet class in applet program
 
import java.applet.*;

public class GuiExample extends Applet


Consider the above example.What we are doing here is
1)importing the applet package which contains not the Applet class.
2)In the next line the Applet class is inherited so that its methods init,start,stop,destroy,paint can be overridden to perform the desired task.
Hope this helps.Good Luck

state 19Apr2012 11:28

Re: why we have to extends applet class in applet program
 
I am sorry I meant "which contains the Applet class"


All times are GMT +5.5. The time now is 02:31.