tabField.setAccessible(true);
final FX2Tab tab = (FX2Tab) tabField.get(n);
Field btnField = n.getClass().getDeclaredField("closeBtn");
btnField.setAccessible(true);
StackPane b = (StackPane) btnField.get(n);
final EventHandler<? super MouseEvent> originalHandler = b.onMousePressedProperty().get();
b.setOnMousePressed(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
if( tab.getCloseVetoHandler() == null || ! tab.getCloseVetoHandler().call(tab) ) {