This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes href in JOptionPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "href in JOptionPane" Watch "href in JOptionPane" New topic
Author

href in JOptionPane

Ken Clark
Greenhorn

Joined: Aug 02, 2004
Posts: 11
I've created a JOptionPane and am formatting the text using <html> tags. I'm able to add a link to a web site via the <a href="www.somwhere.com">Go Here</a>, and it shows up as a link in the JOptionPane. The problem is that nothing happens when I click on the link.
Do I need to create a MouseListener make this happen?

code snippet:

String message = "<html><center>";
message += "<p>Some text";
message += "<p><a href=\"http://www.yahoo.com\">Yahoo</a>";
message += "</center></html>";

JOptionPane.showMessageDialog(this, message, "Info", JOptionPane.INFORMATION_MESSAGE);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: href in JOptionPane
 
Similar Threads
Error Handling
JSP auto refresh flickering problem
how to handle Null values?
errorPage doesn't got to new page
Removing a href tags using XSL