devxlogo

Opening a Browser in a Browser Window Through an Applet Program

Opening a Browser in a Browser Window Through an Applet Program

If you want to show online help (HTML Pages or images) through your applet by clicking the Help button or the F1 key or some other icon, you have to invoke the relevant help page in the Browser window.

Solution:There is a method in the interface java.applet.AppletContext calledshowDocument(). There are two versions of this method available.

 public void showDocument(URL url,String target) andpublic void showDocument(URL url)


The first one requests the browser to show the Web page being indicated by the URL argument. The target argument indicates in which HTML frame the document is to be displayed. The target argument is interpreted as follows:

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist