Description
The following code throws an exception
import groovy.swing.SwingBuilder def i = "One" new SwingBuilder().menuItem("Option $i")
java.lang.RuntimeException: Failed to create component for 'menuItem' reason: java.lang.RuntimeException: menuItem can only have a value argument of type javax.swing.Action, javax.swing.Icon, java.lang.String, or javax.swing.JMenuItem
This may happen in other parts of the builder. A proposed solution is to register a attribute delegate that converts to strings all values that are actually GStrings before the node is instantiated.