One of the most powerful, and underused, features of JavaScript is its capability to access the objects, properties, and methods of Java applets . Although JavaScript and Java have similar names and syntaxes, they fill different Web programming needs. Web builders use Java to make applets, which function as custom Web page components. Applets interact with users via a limited area of the browser window. JavaScript lets you create scripts that respond to Web page events and perform local processing on the user's browser.
Scripts have access to the entire browser window and all objects contained within the window.
They also have the ability to create, open, and interact with other browser windows. Basically, you use Java to develop custom Web components, and JavaScript to integrate those components into useful Web applications. XYZ Corp. A Java applet streamlines the navigation of the Web site. It displays a hierarchical structure of the site's Web pages. Before I talk about how the applet and the JavaScript interact, you should visit the fictitious Web site and familiarize yourself with the applet's operation.