Android Training in Chandigarh : Life Cycle of Applet

Java Applet : Android Training In Chandigarh


Android Training in Chandigarh


A Java applet is a small dynamic Java program that can be conveyed through the Internet and run by a Java-compatible Web browser. The main difference between Java-based applications and applets is that applets are commonly executed in Applet Viewer or Java-compatible Web browser. All applets import the java.awt package.


The following are two issues with Java applets:
  • Security: Java resolves the security issue by defining applets to Java’s execution environment and avoid access to system resources.
  • Portability: Portability is defined as the applet’s ability to run on different computers and operating systems.
Any browser with Java Virtual Machine (JVM) can execute bytecode. Bytecodes is the output of a Java compiler and can be run only in a JVM. Bytecode is Java solution for security and portability.  
To learn more about Android go for Android Training in Chandigarh

Applet Life Cycle

Android Training in Chandigarh sector 34


Initial State

When a new applet is born or created, applet is activated by calling init() method. The new objects to the applet are created and initial values are set, images are loaded and the colors of the images are set. An applet is loaded only once in its lifetime. Syntax :-  public void init( )


Running State
An applet achieves the running state when the system calls the start() method. This occurs as soon as the applet is loaded. An applet may also start when it is in idle state. The start() method is overridden. Syntax:-  public void start( )


Idle State
An applet comes in idle state when its execution has been stopped either essentially. An applet is essentially stopped when any one leave the page containing the currently running applet. An applet is completely stopped when we call stop() method to stop its execution. Syntax:-
public void stop ()


Dead State
An applet is gone to the dead state when it has been removed from the memory. This can be done by using destroy() method. Syntax:-
public void destroy( )
To learn more about these concepts go for Android Training in Chandigarh

Advantages of Applets : Android Training in Chandigarh
  1. Cross Platform and can run on the windows, MacOS and lInux Platform.
  2. Applet can work all the versions of java Plugins.
  3. Applets run in the SandBox.
  4. Applets are supported by most web Browser.
  5. Applets are cached in most web browsers.

Disadvantages of Applets : Android Training in Chandigarh
  1. Java Plug-in is required to run applets.
  2. Java applets required JVM.
  3. If Applet is not already cached in the machine , it will be downloaded from internet and will take time.
  4. It is difficult to design and build good user interface in Applet compared to HTML Technologies.


FOR INFO GRAPH OF THIS ARTICLE CLICK ON LINK :-


0 comments:

Post a Comment

Note: only a member of this blog may post a comment.