How to delete row from the table model without selecting it? The user will just input a number which matches the data from the table?
example:
ID | Name | Year |
----------------------------------
1 | Derpina D. | 3rd year |
----------------------------------
2 | Zsannen M. | 2nd Year |
----------------------------------
*The program will ask for an existing ID that will be deleted.
ENTER ID #: 1
*Once the user entered a valid ID, all the information about ID #1 will be deleted.
ID | Name | Year |
----------------------------------
2 | Zsannen M. | 2nd Year |
----------------------------------
*The information is saved to a .txt file. Whenever i input ID number, the information about the entered ID will be deleted on the .txt file. The problem is, only in the GUI, the table, is not being deleted.
*When deleting, you don't select the row. Instead, you have to input the ID #.
Would someone help me with this? Thanks in return.
Badly confused here. I've tried some codes but it doesn't work out.
THIS IS MY CODE BELOW: