One article that I read about
testing GUI intensive applications suggested subclassing the Graphics object to provide a textual representation of the calls made on it (
http://c2.com/cgi/wiki?ExtremeProgrammingTestingGuiIntensiveApps) my question is, since the Graphics object is propagated by the Swing components that control the rendering of individual controls, how can one substitute a subclass in a coherent manner. One solution I can think of is something like this:
But since you would have to add the boilerplate to every GUI class, that seems a bit clumsy. Is there a better way where the Graphics subclass will automatically get propogated throughout the system?