I have a JTable. I want to know which row and column are selected when the user presses Enter. How can I get this information?
I have a JTable . I want to know which row and column are
Share
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.
Add this to your table. Have two
intglobals forrowClickedandcolClicked. Should be good to goIf you talking about using the keyboard to register the event, you must find the selected cell, then add a
KeyListenerto it. You can use the following code to find the selected cell. Note that it really depends on the cell selection mode.