Reason: JavaFX throws class cast exception if for a TableColumn.CellDataFeatures<Ticket, String> param we call param.getTrip()
That's why even though we are showing tickets the columns must of type Trip since most of the information is from the trip table and apparently calling the getters throws a class cast exception.
The only field from (Ticket) is ticket id and it is not shown. A interface needs to be implemented to combine both.
Reason: JavaFX throws class cast exception if for a TableColumn.CellDataFeatures<Ticket, String> param we call param.getTrip()
That's why even though we are showing tickets the columns must of type Trip since most of the information is from the trip table and apparently calling the getters throws a class cast exception.
The only field from (Ticket) is ticket id and it is not shown. A interface needs to be implemented to combine both.