javafx, TableView: detect a doubleclick on a cell

前端 未结 5 1667
野趣味
野趣味 2020-12-05 18:47

Given a TableView, i need to detect the doubleclick on a cell.

tableView.setOnMouseClicked(new EventHandler()
{
    @Override
    public v         


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 19:16

    Create your cell using a cell factory and in the cell factory which creates the cell node, place an mouse event handler or filter on the node rather than the tableView.

提交回复
热议问题