Click to See Complete Forum and Search --> : Opening Webpages in a given frame when...


Mike
February 25th, 1999, 03:31 PM
I'm new to java, and swing. I've created a small applet that uses menus and tool bars, but I cannot figure out how to make it so that when a menu item is clicked on a webpage opens in a certain frame.


I know how to handle the action of the menu being clicked on. I just need the code to open the webpage in a given frame.


Thanks,

Mike

Sunil Sarje
February 27th, 1999, 05:09 PM
Hi Mike

Its very simple to open an url from existing applet.

just try it

step 1: AppletContext ac = getAppletContext();

step 2: ac.showDocument(new URL("http://www.java.sun.com"));

catch MalforedURLException here


Write the step 2 in event handling method etc.


Actully I have Checked now .& I found it works well


Have a nice testing


bye


:javafaq@mailcity.com

:sunil_sarje@mailcity.com

sunil sarje
February 27th, 1999, 05:09 PM
Hi Mike

Its very simple to open an url from existing applet.

just try it

step 1: AppletContext ac = getAppletContext();

step 2: ac.showDocument(new URL("http://www.java.sun.com"));

catch MalforedURLException here


Write the step 2 in event handling method etc.


Actully I have Checked now .& I found it works well


Have a nice testing


bye


:javafaq@mailcity.com

:sunil_sarje@mailcity.com