What is the difference between an Applet and an Application?

John Zukowski

Basically, an applet runs in a browser, loaded from an APPLET tag in an HTML file. The browser than calls applet life-cycle methods like start(), stop(), init(), and destroy() as needed. There are security restrictions an applet must abide by.

An application is started from the command line (java command) and starts with the main() method. There are no life-cycle methods which are automatically called within an application, nor are there security restrictions (by default).

In an applet and an application with a Frame/Window, the paint() method is automatically called to update the screen.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact