There is no solution for the public v. private issue. Its a side effect of the security restrictions placed on reflection. Reflection can not invoke a method unless the class that's doing the invoking is doing it within the appropriate scope, so even package-protected things have to be invoked in the same package.
Trouble is the invoker in this case belongs to java.beans, not to the package of your GUI code. There's simply no way around that unless the JDK opens up more aspects of the .classfile, and that opens up a larger can of worms that I'd really rather not deal with.
Besides, IMHO, if something can be called via the GUI, its "public", and thus the method that invokes it on my Object should also be public. Its part of what something from the outside can do to my object. By having it public, it also gives me the room to test it with external testing tools.
As one noted, one could instead advertise what actions are available by making public an array of Action objects. It still allows anybody to activate an action, but at least you've made it clear what they're meant to call.
With the stack-trace issue, that was just plain bad, although my version had the same issue. The trouble in that case is the general problem of dispatching Exceptions in any GUI program. If you can't catch them, they propagate up to the AWT event queue, where they'll be printStackTraced anyways, and in the case of InvocationTargetException (written before JDK 1.4 built-in nested exceptions) the real source of the problem may end up not displayed in the dump.
Really, in any framework for a GUI, one should have the means to add an ExceptionHandler type of Object to deal with that sort of thing, but the JDK didn't build it in.
An undocumented, but often used 'feature' is the sun.awt.exception.handler
property (see http://forum.java.sun.com/thread.jsp?forum=52&thread=92316),
which allows you to handle uncaught exceptions yourself. Whilst there are
plenty of things wrong with this, its still used in 1.4 apps (afaik there
is no replacement), and this could have been used by
EventHandler.
cheers
dim
Dmitri Colebatch