File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Href in Jtable(or similar action) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Href in Jtable(or similar action)" Watch "Href in Jtable(or similar action)" New topic

Href in Jtable(or similar action)

surya naidu
Ranch Hand

Joined: Jul 26, 2010
Posts: 32
Hi I have a Jtable which shows a list of users

I have a requirement where i need to be able to click on a username ,I need to capture the username clicked

and then be able to edit the particular users my profile

Can someone help me on how to do this

something like adding a mouse listener on the table....or any other way to do it

(I tried adding a mouse listener to the table but it wouldnt work .or some how i couldnt get it work)
Paul Clapham

Joined: Oct 14, 2005
Posts: 19869

Usually you just add a selection listener, so that when somebody clicks on a row and thereby selects that row, your listener is notified. The way to do that is a little bit obscure:
surya naidu
Ranch Hand

Joined: Jul 26, 2010
Posts: 32
Thank you...I used it like this and got it to work....

I agree. Here's the link:
subject: Href in Jtable(or similar action)
It's not a secret anymore!