How can I get the column number and row when clicking on a cell in the TableView? I came up with such a durat way to find the column number:
((TablePosition) tableS.getSelectionModel().getSelectedCells().get(0)).getTableColumn().getText() And then compare it with the names of the columns obviously known. This is very crooked, I understand. And which way is good?
In addition, then you will need to find out the contents of the first cell in the selected row.
That is, as a result, you need to know the entire contents of the first cell in the selected row and the cell number in this row that you clicked on.