class SimpleCoroutineView : View("Simple Coroutine") { val data = SimpleStringProperty("Initial") override val root = vbox { textfield(data) button("Coroutine") { setOnAction { GlobalScope.launch { println( "fx thread? ${Platform.isFxApplicationThread()}") Platform.runLater { data.value = "Carl" } } } } } } class SimpleCoroutine : App(SimpleCoroutineView::class) fun main(args: Array) { launch(args) }