actor.addListener(new ChangeListener() { public void changed (ChangeEvent event, Actor actor) { System.out.println("Changed!"); } });
I can’t figure out how to convert the ChangeEvent handler code from Java to Kotlin
Advertisement
Answer
actor.addListener(object : ChangeListener() { fun changed(event: ChangeEvent?, actor: Actor?) { println("Changed!") } })