wood burning stoves 2.0*
The moose likes Applets and the fly likes Applets and Hyperlinks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applets and Hyperlinks" Watch "Applets and Hyperlinks" New topic
Author

Applets and Hyperlinks

Sam Bluesman
Ranch Hand

Joined: Nov 21, 2004
Posts: 191
Can u attach a hyperlink to an applet so that when a user clicks anywhere on the applet it takes the user to a different website or webpage?

If so...how?


Moosey knows best
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Please change your displayed name to conform to our
naming policy. In short, your name must be a first name and last name, separated by a space and not obviously fake.
Now, about your question. No, but you can do something similar by calling AppletContext.showDocument() to load a new URL in the browser.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Swathi Prakash
Ranch Hand

Joined: Jan 18, 2005
Posts: 49
urlField = new TextField("http://localhost/");

userUrl = new URL(s);
urlField.setText(userUrl.toString());
getAppletContext().showDocument(userUrl, "_blank");
Sam Bluesman
Ranch Hand

Joined: Nov 21, 2004
Posts: 191
That is my real name: Mr. Sam Bluesman
Sam Bluesman
Ranch Hand

Joined: Nov 21, 2004
Posts: 191
is that better? Or would you like me to put Samual? i wouldnt want you to get upset
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

We ask that people use their real names because we want this place to be friendly to the newcomer and people seem to take the anynomity of the internet as a license to be short-tempered and insulting. Thanks for making the change and enjoy the Ranch.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Applets and Hyperlinks
 
Similar Threads
'signing' and 'grant'
applet question
Tif Image printing from applet
WebPage can't run applet as signed after another signed applet is disabled
applet and jsp - retain values in applet ?? PLEASE HELP!