Link to home
Start Free TrialLog in
Avatar of sidds77
sidds77

asked on

Creating hyperlinks in an applet...

how do i make a simple String as a hyperlink in my java applet and when clicked, pass some parameters in the url to the target page??
Avatar of kamalindia
kamalindia

Use getAppletContext().showDocument(URL) method to call the target page with parameter list


getAppletContext().showDocument("http://myserver.com/exampl1.jsp?site='javazone'");


Regards

Raj
Avatar of sidds77

ASKER

hi raj,
thanks. Thats after a hyperlink is created and a user clicks on that then we can load the URL in that form.
But i want to know how to create that hyperlink in the applet. for example :
String link="Click Here";
Now how do i make this String 'link' as a hyperlink so that when a user takes the cursor over this text, it acts as an hyperlink.

i will tell u in some days that it si spossible or not !
I n doing rnd on that !

Thanx

Rohit

ASKER CERTIFIED SOLUTION
Avatar of kapitany
kapitany

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Labels do not generate events.
ahosang you are wrong. You can add a mouse listener to a label.
Methods inherited from class java.awt.Component
 action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener,
 addMouseListener, addMouseMotionListener, addPropertyChangeListener,
 addPropertyChangeListener,

etc, so check the API.
BR,
kapi
Avatar of sidds77

ASKER

thanks kapitany,
that works. There's another slight problem.
This ticker applet has innumerable stock names and prices.
How do i create each individual quote and price as a hyperlink?
These qoutes are retrieved dynamically from the database.
Please help??
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange