Each browser has a SecurityManager object that checks for applet security violations. When a SecurityManager detects a violation, it throws a SecurityException. The java.applet package provides API that gives applets some capabilities that applications don't have. For example, applets can play sounds, which other programs can't do yet. Applets running within a Web browser can easily cause HTML documents to be displayed.
Applets can invoke public methods of other applets on the same page.
Although most applets stop running once you leave their page, they don't have to.