How to add link in applet?

Discussion in 'Java' started by JTL.zheng, Jun 11, 2007.

  1. JTL.zheng

    JTL.zheng Guest

    how to add text link in applet or java app?

    Thank you in advance.
     
    JTL.zheng, Jun 11, 2007
    #1
    1. Advertising

  2. 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
     
    Andrew Thompson, Jun 11, 2007
    #2
    1. Advertising

  3. JTL.zheng

    Real Gagnon Guest

    Real Gagnon, Jun 12, 2007
    #3
  4. JTL.zheng

    JTL.zheng Guest

    Thanks to all of you.
    It works..: )
     
    JTL.zheng, Jun 12, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    902
    Kevin Spencer
    May 17, 2005
  2. Rob Love

    applet vs. canvas in applet

    Rob Love, Jul 7, 2003, in forum: Java
    Replies:
    1
    Views:
    640
    Liu, Chunyen
    Jul 7, 2003
  3. webster
    Replies:
    0
    Views:
    876
    webster
    Jul 20, 2003
  4. Andrew Thompson
    Replies:
    0
    Views:
    429
    Andrew Thompson
    Aug 5, 2003
  5. Blah Blah
    Replies:
    0
    Views:
    1,446
    Blah Blah
    Aug 13, 2003
Loading...

Share This Page