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)

size=3>
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:

devx-admin

Share the Post: