## Not run:
# jdynamicCompile("java.awt.event.ActionListener", "RActionListener")
# l <- .JNew("RActionListener",
# foreignReference(list(actionPerformed=function() print("ok"))))
# button$add(l)
# ## End(Not run)
## Not run:
# def <- jdynamicCompile("java.awt.event.ActionListener",
# "RActionListener", load=F)
# def$write()
# ## End(Not run)
Run the code above in your browser using DataLab