I've been looking around and have noticed the response given on this post: Detect doubleclick on row of TableView JavaFX
However, this post uses lambda expressions and I'm unsure how to convert these to be used in JavaFX 2 code. My main goal is to be able to click a row, and then pop up a new window that has the information that was stored in that row. As long as I can get the Callback working, I will be able to take it from there! Any advice would be appreciated.
table.setRowFactory( tv -> {
TableRow<MyType> row = new TableRow<>();
row.setOnMouseClicked(event -> {
if (event.getClickCount() == 2 && (! row.isEmpty()) ) {
MyType rowData = row.getItem();
System.out.println(rowData);
}
});
return row ;
});