This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Does anyone know or has anyone created a class for putting an HTML a href link on a JLabel or button or something that will launch the default web browser and go to the specified link? I tried using HTML inside the Label text and that looked like it was going to work, but I didn't add any click handling events, so by default it won't work. I am going to continue to work on this, but thought if anyone has already done it, they might help me out. If I figure it out in the mean time, I will post back here. Thanks.
Ok, I found out a way to do this. I found a post from soneone here at the ranch from December of 2000. Here is the thread. I used that class that was posted. And then I created a LinkLabel class that looks like this:
It works in Windows. I haven't tried it in Linux. Hope this helps someone else.
I created something like this. it has lots of great features like highlighting the link in a color when hovered over and it works from an applet or an application. i plan on adding it to my open source java classes - if anyone ewants it let me know and i'll go ahead and post it for all to see/use. it actually extends JPanel so that it fits in well anywhere in a gui. brian