Click to See Complete Forum and Search --> : Calling an HTML page from an Applet


Monika
April 29th, 2000, 12:35 AM
How to call an HTML page from an applet?

bharath
April 29th, 2000, 03:01 AM
hai,
U can go for java liveconnect.
Ie. invoking the JSObject from the applet for the html page function.

Hope u got wat u needed.
If u want furthe details
mail me.

bye
bharath
Email Id: bharath@vsofti.stph.net








S.V Bharath Reddy
Software Engineer,
Hyderabad.

kib63613
April 29th, 2000, 06:01 AM
In the java.applet.AppletContext interface, there is the method showDocument() which can
be used to show the html page. You may look it like this

AppletContext ac = getAppletContext();
URL html_url = new URL("http://www.xxxx.com/hello.html");
ac.showDocument(html_url);



In order to simplify the code for clearness, I ignore the exception. When you code your code, you may
try the code and catch the exception. You may also reference the JDK document. In my home page,
I also have the article which just take advantage this techinque to link to the other web page.
http://www.geocities.com/kib63613/
in the material area, you may find the relative sample in the article, awt-button application-building button,
part two.
good luck,
Alfred Wu