File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes hyperlink in swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "hyperlink in swing" Watch "hyperlink in swing" New topic
Author

hyperlink in swing

Tiju Thomas
Greenhorn

Joined: May 25, 2008
Posts: 22
How do we give hyperlinks in swing? Like the in html (anchor tag).

Miklos Szeles
Ranch Hand

Joined: Oct 21, 2008
Posts: 142
Hi Tiju,

Can you be a little bit more specific? Where do you want to use a hyperlink? Are you talking about a component which displays an underlined blue text and can be clicked? If yes then you have to implement it yourself. This post can be useful.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37879
    
  22
Miklos Szeles wrote: . . . This post can be useful.
It is useful, but it has some misprints in: "" or " " when " would be correct.
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
Consider a JButton with its border turned off.
See http://www.coderanch.com/t/345445/#1516613


bitguru blog
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2152
    
    7
Use a JEditorPane. It can display HTML with Hyperlinks.
Tiju Thomas
Greenhorn

Joined: May 25, 2008
Posts: 22
I actually wanted to open a url in the default browser when I click a JLabel
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

Let me see:
Original question posted on 28 Sep 2009
Today: 5 Feb 2010
Wow!


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hyperlink in swing
 
Similar Threads
getting information from GUI
WA #2 ..... word association
Which is the hottest Java Technolgy?
Allow only numbers?
WA #1.....word association