Sounds simple but it isn't. First a little JTable 101. Each cell in a JTable isn't a component. It is a block on the screen that is painted. Think of it more like an image. The JTable looks up a cell renderer based on the cell location, object type in the cell, etc and then uses it to paint the area. The default cell render is based off a JLabel. Since there is no component, you can't add a mouse listener or track click events to that label.
When you click on a cell the table goes into "edit" mode. A cell editor is created and displayed in the area the cell previous occupied. This is an acutal component that you can manipulate if you want.
Now back to your case. I'm guessing you want your links to appear as html style links. Since the table uses a render that extends JLabel (which supports html) you can feed it text like this:
However, I wouldn't recommend altering the data in your model just to effect display. Instead I would create a custom cell renderer which accomplishes this effect and set it on the table. You could either wrap your text in the HTML or manually set font color and style properties on the renderer to mimic html.
Now even if you were to include the url in the html you still can't click on it. There is no component in the table. You don't really want to go into edit mode when clicking on a url. You just want to open that link. To accomplish this you would add a mouse listener to the table itself. When you receive a click event, you would then programatically determine which cell it was over, go back to your model and get the url, and finally use other Java API calls to open that url.
A quick Google search will reveal examples of creating a cell renderer, using a mouse listener, and opening a url if you need more information.
Originally posted by vaibhav agarwal: Exactly I want only it bother about how so please give me some code related to this topic
Thanks & Regards Vaibhav
That's really not what we are here to do. Like Scott said, Google turns up a ton of code examples related to your issue. Not only that but you can search this very forum for code samples.
Here is a quick rundown of how javaranch works. You write some code, it doesn't work, we help you figure it out. We also realize that sometimes a simple code snippit sends you in the right direction, however, you haven't shown any willingness to figure any of this out on your own.
We love helping people, but we love helping people that try even more.
To get you started though Sun has a wonderful tutorial on JTables and it even shows you how to write your very own cell renderer.