Yes, that has to do with Swing's complexity issues. Many components accept an Action property, they also are ActionListeners, meaning that actionPerformed is available via reflection.
You would like to use action: when the intent is to reuse an Action object across two or more components, otherwise actionPerformed: is the way to go.
Cheers,
Andres
Glen Pepicelli wrote:
I see something that was confusing me... there is both an "action" and "actionperformed".. you can; tpass a closure directly to "action" but you can with "actionperformed":
menuBar() {
menu (text: "Debug") {
menuItem(text: "Open Debug Window")
menuItem(text: "hello", actionPerformed: {println "hi!!"})
}
}
Glen