can java open the page, if clicked on the link?

Hi every one...

may any one help me?

i created an about dialog box... and it contains a label which is contains my web page... but i want the program... if i clicked on the my web address... it open my page in a default browser...

i tried so hard.. but i wasn't able to do that...

can any one help me?

[333 byte] By [amanjmma] at [2007-11-27 10:54:24]
# 1

U can do with a JButton by giving the look and feel like JLabel.

still more u search on the net,u will can get JLinkButton(user defined) class ,

by using that u can achieve this easily.

nirgun_xyza at 2007-7-29 11:50:03 > top of Java-index,Desktop,Core GUI APIs...
# 2

Alternativly you could use a read-only JEditorPane to display you HTML-link. Register a HyperlinkListener to the JEditorPane (see the Javadoc of JEditorPane). From that listener you could call the browse method of the Desktop class, if you use Java SE 6.

-Puce

Pucea at 2007-7-29 11:50:03 > top of Java-index,Desktop,Core GUI APIs...
# 3

> if i clicked on the my web address... it open my page in a default browser...

In JDK6 there is a new Desktop API that allows you to do this.

In previous versions you need to write your own hacks. Execute my code in this posting and read the article for a suggestion:

http://forum.java.sun.com/thread.jspa?forumID=57&threadID=5123633

camickra at 2007-7-29 11:50:03 > top of Java-index,Desktop,Core GUI APIs...