onAction

fun onAction(handlerCombination: HandlerCombination = HandlerCombination.AFTER, block: (event: ActionEvent) -> Unit)

Usage :

myMenuItem.onAction { ... }

Equivalent to the overly verbose JavaFX style :

myMenuItem.onAction = EventHandler(EventType.ActionEvent) { ... }