JTL.zheng wrote:
>how to add text link in applet or java app?
A link-like component can be made by adding a
MouseListener to a (J)Label.
In an application (or applet) launched using Java
web start (JWS), the BasicService.showDocument(URL) *
method can be used to open the user's default browser,
pointing to the URL.
* e.g. <http://www.physci.org/jws/> (see the 'BasicService'
example at the top.)
If the app. is not being launched using web start,
the options include.
1) For an applet, the AppletContext.showDocument().
But note that browsers do not have to implement it,
and there is no feedback.
2) For an application or signed applet, BrowserLauncher2.
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via
http://www.javakb.com