Task

Create a window that has:

   a label that says   "There have been no clicks yet" 
   a button that says   "click me"


Upon clicking the button with the mouse, the label should change and show the number of times the button has been clicked.




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