written 8.6 years ago by | • modified 8.6 years ago |
Mumbai University > Information Technology > Sem 3 > Object Oriented Programming Methodology
Marks: 5 M
Year: May 2014, May 2015
written 8.6 years ago by | • modified 8.6 years ago |
Mumbai University > Information Technology > Sem 3 > Object Oriented Programming Methodology
Marks: 5 M
Year: May 2014, May 2015
written 8.6 years ago by |
1) Initialization State:
The initialization occurs only once in the applet’s life cycle. To provide any of the behaviours mentioned above, we must override the init() method.
public void init()
{
………//action
}
Running State
This again starts the applet running. Unlike init(), start() method can be called more than once. We may override the start() method to create a thread to control the applet.
public void start()
{
………//action
}
2) Idle or Stopped State
We can achieve this by overriding the stop() method:
public void stop()
{
……//action
}
3) Dead State
Like initialization, destroying stage occurs only once in the applet’s life cycle. If the applet has created any resources, like threads, we may override the destroy() method to clean up these resources.
Public void destroy()
{ …….//action}