Hi I need to know which method to use on which event, I want to get the selected row when I click on this row, and lets say this JTable contains 3 columns, if I get the selected row, how can I access the data in its 3 cells?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The event to use is JTable table.getSelectedRow() which returns an int type of index of the selected row. You can make a statement such as: