I need to use an an anonymous inner class to make this work.
I don't see how that's possible. As far as I know, an anonymous inner class just creates an object from a pre-existing class, and you can override one or more of the class methods as you create the object. So, as an alternative, you could define a subclass that extends the pre-existing class, which overrides one of the pre-existing class's methods, and then you can create an object of the extended class. Same end result.
See if this helps you with your understanding of anonymous inner classes in general:
http://www.sitepoint.com/forums/showpost.php?p=1892977&postcount=14 and more specific to your situation:
http://www.javaranch.com/campfire/StoryInner.jsp [ October 06, 2006: Message edited by: sven studde ]