Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > How to add link in applet?

Reply
Thread Tools

How to add link in applet?

 
 
JTL.zheng
Guest
Posts: n/a
 
      06-11-2007
how to add text link in applet or java app?

Thank you in advance.

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      06-11-2007
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

 
Reply With Quote
 
 
 
 
Real Gagnon
Guest
Posts: n/a
 
      06-12-2007
"JTL.zheng" <(E-Mail Removed)> wrote in news:1181573021.900980.292250
@j4g2000prf.googlegroups.com:

> how to add text link in applet or java app?


For AWT Applet, try my URLLabel component.

http://www.rgagnon.com/javadetails/java-0273.html

Bye.

--
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
 
Reply With Quote
 
JTL.zheng
Guest
Posts: n/a
 
      06-12-2007
Thanks to all of you.
It works..: )

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Is D-Link DSL-604T same as D-Link DSL-604+ ? norm Wireless Networking 6 11-18-2005 10:25 AM
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM
D-LINK DWL-AG650 doesn't work with WinXP - Zero Configuration Service (WZCSVC) / D-Link AirXpert nearly works Johannes Rosenstock Wireless Networking 0 08-27-2004 11:49 PM



Advertisments