when (currentVat.morphInto("awt")) -> { var clicks := 0 def w := ("Rosetta Code 'Simple Windowed Application'") w.setContentPane(JPanel` ${def l := ("There have been no clicks yet.")} $\ ${def b := ("Click Me")} `) b.addActionListener(def _ { to actionPerformed(_) { clicks += 1 l.setText(`Number of clicks: $clicks`) } }) w.pack() w.show() }