JTable row selection

I am trying to give the user the option of selecting a specific row and having the mouseclick return an int value for the row each time they click. It seems from reading the API and other examples that this is something that should be easy to implement but in all honesty I have not been able to do it. I would post my code but I have tried several different things. If someone has done this could you please show me how? Thanks