I have a JTable called 'table'. The table has four columns and some rows.
The columns are "firstName", "lastName","address"," married". firstName, lastName and address are textFields, married is a checkBox.
I have inserted some data into the table. Now, when i click into a particular row of the table, i want the firstName, lastName, address and married to show their information in the respective textField and checkBox.
I have added a mouseEvent to the table and tried to use table.getSelectedRow() and table.getSelectedColumn(), but it doesn't work. They give a single cell position at a time and i cannot manipulate them.
I will highly appreciate any help
Could u paste ur code using code tag?
uset the logique as follow
Event is mouse clicked
private void mousedClicked(evt)
then typecast for String objectname.toString() for string and set value in textfiled
this can be done by texfieldname.setText(value); in the function of mouseclicked method i hope it will solve problem
Yes, it worked. Thank you very much !!