Take the 2-minute tour ×

There are a lot of tutorials, And a lot of suggestions to achieve this by extending JavaFX cells to make them editable. A good one is this stackoverflow question.
But the official tutorials uses a method call to create the callback without writing all that code, By calling


However when I do this in my code (FormTokens is my "model"):

// At beginning of class declaration
@FXML private TableColumn<FormTokens, String> valuColumn;

// Later at initialization

Compiler says:

The method setCellFactory( Callback<TableColumn<FormTokens,String>,TableCell<FormTokens,String>>)
in the type TableColumn<FormTokens,String>
is not applicable for the arguments

If I remove the method call mentioned above everything works well except that TableView cells are not editable. What am I doing wrong?

edit: I just found this: Javafx TableView can not be edited But there are no solutions. How do I cast Callback<TableColumn<Object,... to Callback<TableColumn<FormTokens,...?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Specify the exact type explicitly for generic parameter as

share|improve this answer
add comment

Your Answer


