Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create hyperlink from java

 
Ramaswamy Narayanan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear friends

i need to create an hyperlink in my Swing page.
on clicking the hyperlink i have to link to file specified.

is it possible from java to create an hyperlink.
if possible, please help me.

thank you
bye
narayanan
 
Rema Remulta
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can do this in java thru the implementation of HyperlinkListener. You may take a look this simple code as an example and play around according to what you want:


Hope this helps.

Good luck,
Rema
 
Ramaswamy Narayanan
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai

ok this will help me to check whether the link is activated or not.
if activated, it will open the page.
but what my question is how to add a link in the Swing page.
pls help
bye
narayanan
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramaswamy,
This forum is dedicated for discussing WebServices related topics. I am moving this thread to "Swing/AWT" forum.
 
Asif Lodhi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramaswamy Narayanan:
hai

ok this will help me to check whether the link is activated or not.
if activated, it will open the page.
but what my question is how to add a link in the Swing page.
pls help
bye
narayanan


http://java.sun.com/docs/books/tutorial/uiswing/components/html.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic