| Author |
Applets and Hyperlinks
|
Sam Bluesman
Ranch Hand
Joined: Nov 21, 2004
Posts: 188
|
|
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: 8265
|
|
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: 188
|
|
|
That is my real name: Mr. Sam Bluesman
|
 |
Sam Bluesman
Ranch Hand
Joined: Nov 21, 2004
Posts: 188
|
|
|
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: 8265
|
|
|
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.
|
 |
 |
|
|
subject: Applets and Hyperlinks
|
|
|