column("Name", Person::name){ cellFormat { if (graphic == null) { graphic = textfield(itemProperty()) { isEditable = false padding = Insets(0.0) background = Background.EMPTY addEventFilter( MouseEvent.MOUSE_PRESSED ){ if( parent != null && it.isPrimaryButtonDown ) { val me = it.copyFor( parent, parent ) if( selectionModel.selectedIndex != getTableRow().index ) { Platform.runLater{ tableView.requestFocus() } } Event.fireEvent( parent, me ) } } addEventFilter( MouseEvent.MOUSE_CLICKED ){ if( parent != null && it.isPrimaryButtonDown ) { val me = it.copyFor( parent, parent ) Event.fireEvent( parent, me ) } } } }