posted 6 years ago
I have the following requirement:
1. When tab/enter key is pressed in JTable, read the value in selected cell and go to the next cell
2. This should happen whether the cell is in select mode or edit mode
The program written is not working when a cell with existing value is edited by pressing F2 key and enter key is pressed. For all other scenarios it is working fine.
To recreate the issue, please follow the below steps:
Enter "a" in cell(0,0) --> press enter key --> use left arrow to go to cell(0,0) --> press F2 key --> Enter "b" in cell(0,0) --> Press enter key --> Here action performed is not called.
Please review the below program and let me know what changes to be done to meet the requirement.
TableTest.java: