Java Applets (Inshort)

What is an Applet?

Applet is a small program which provides a Graphical User Interface (GUI) to user.Applet programs are executed with a special JDK tool- appletviewer. An applet is a Java program that runs in a Web browser. An applet can be a fully functional Java application because it has the entire Java API at its disposal.When a user views an HTML page that contains an applet, the code for the applet is downloaded to the user’s machine. A JVM is required to view an applet.

What is difference between Applet and Application?

Sr. No.ApplicationApplet
1.Applications are just like a Java programs that can be execute independently without using  web browser.Applets are small Java programs that are designed to be included with HTML web document. They require a Java-enabled web browser for execution.
2.Application program requires a main function for its execution.Applet does not require a main function for its execution.
3.Java application programs have the full access to the local file system  network.Applets don’t have local disk and network access.
4.Applications can access all kinds of resources available on the system.Applets can only access the browser specific services. They don’t have access to the local system.
5.Applications can executes the programs from the local system.Applets cannot execute programs from the local machine.
6.An application program is needed to perform some task directly for the user.An applet program is needed to perform small tasks or the part of it.

Applet Life Cycle

Applet Methods Sequence


As it operates on the client side, it requires much less response time. Any browser that has JVM operating in it can operate it. 

Categories: Editorial, Education, Tech

Tagged as: , ,