Creating custom event handlers with scripting

Hmmm. I don't know if those are in the API. You have to set very specificly-named Swing component client properties with lists of objects that encapsulate the events. You might need to do some reflection research on the contents of various client props. Perhaps this topic: