The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Links in Applet

Posted by Sanjay Ambardar on January 30, 2001 at 10:26 PM

> There are many ways to do that. I don't know what is your requirement regarding GUI. I will tell you how to go to new page from an applet. Let me know the actual GUI requiremnt then I will tell you exact procedure.
> To open a new page from applet use
> getAppletContext().showDocument ( "your new page URL" ) ;
> or,
> getAppletContext().showDocument ( "your new page URL", "target ie. which window will display the page" ) ;
> Here getAppletContext() is a method of Applet class which returns an object of a class which implements AppletContext interface.
> In simplest implementation you can write the above code in button clicked event.
> Thanx
> Kishori

Thanks a lot kishori!! My actual requirement is to click on the URL itseelf on the Applet and then go to that web page. So it has to look like following

"In Order to see the contact information please go to the "

The URL will be a web site address. I want to know which event can I capture in this regard as the User has to click on the URL itself. So I will not be able to use the button



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us