tableview.setOnMouseClicked(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent arg0) {
if(arg0.getClickCount()==2)
{
Object item = (Object)tv.getSelectionModel().getSelectedItem();
//TODO
}
}});
I handle the double click event like above code ,for example,open file or something,I found it would be triggered if user double click the blank of the table view or columns of the table view, how can I know user double click on the right items? I only want it to be triggered when user click the items?