How can I right click on a cell in tableview in Javafx (fxml)?
问题 I am programming a table view with JavaFX and fxml. I want to do some actions when a user right clicks on a cell in the table. How can I do that? Is it possible to create a right click menu over a cell? Thanks! 回答1: Implement a cell factory for the table column(s) of interest. Create a cell in the cell factory and register the mouse listener with the cell. Referring to the standard table example you can do something like firstNameCol.setCellFactory(new Callback<TableColumn<Person, String>,