JLabel with html link

Hello, I磎 loading a text in a JLabel, somethig like this:

JLabel label =new JLabel(" <html> <a href=\"www.memi.umss.edu.bo/progra\"> Here </a></html> ");

but when I load this in my JFrame, the link is disabled, I know I can handle the mouseEvent, using positions or somethink like that, but I think there is another component to get this link enabled. Please help me

[468 byte] By [Wilfredoa] at [2007-10-3 5:19:40]
# 1

I'm not sure that that would ever work.

If you're writing a Java Applet, then you have access to the "Applet Context" to call

appletContext.showDocument( "start http://www.memi.umss.edu.bo/progra/" );

If you're in a Java application, then it has no idea how to kick off a web browser, so you'd probably have to ask Windows to try and open a browser for you.

Ie. Something like...

Runtime rt = Runtime.getRuntime();

rt.exec ( "start http://www.memi.umss.edu.bo/progra/" );

regards,

Owen

omcgoverna at 2007-7-14 23:26:35 > top of Java-index,Desktop,Core GUI APIs...
# 2
I really appreciate your help, but I have a java browser, what I want is a link over some component (java application not applet) working.Can any body help me.... ?
Wilfredoa at 2007-7-14 23:26:35 > top of Java-index,Desktop,Core GUI APIs...
# 3
Use a JEditorPane, which can handle HyperLinks.
camickra at 2007-7-14 23:26:35 > top of Java-index,Desktop,Core GUI APIs...
# 4
OK, but I also want my component background transparent, like JLabel. Can anybody help me...
Wilfredoa at 2007-7-14 23:26:35 > top of Java-index,Desktop,Core GUI APIs...
# 5
editorPane.setOpaque( false );
camickra at 2007-7-14 23:26:35 > top of Java-index,Desktop,Core GUI APIs...
# 6
Thank you, I really was getting nervous, i forgot the setOpaque method....I really appreciate your helping me.So long
Wilfredoa at 2007-7-14 23:26:35 > top of Java-index,Desktop,Core GUI APIs...