using fwt using gfx class Main { public static Void main () { button1 := Button { text = "don't click!" onAction.add |Event e| { echo ("clicked by code") } } button2 := Button { text = "click" onAction.add |Event e| { // fire all the event listeners on button1 button1.onAction.fire(e) } } Window { title = "simulate mouse event" size = Size (300, 200) button1, button2, }.open } }