The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

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.

Message:

Links In Applets

Posted by sanjay ambardar on January 30, 2001 at 10:32 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

> Thanks


Sorry kishori I missed a tiny thing in the prevoius question. So the text has to look like this

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

I didn't write word URL in my previous question




Replies:

Sponsored Links



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