HF Java 2nd edition by Kathy Sierra and Bert Bates
has a BeatBox client program in it that uses a lot of inner classes. I'm a novice so I was hoping Bert or someone else could explain if it's normal to have that many inner classes, even in a GUI class?
All but one of them are listeners so I know it makes sense for them to be classes but could you have them as their own class rather then an inner class? Same for the Runnable inner class, couldn't that be it's own class?
I guess I'm just confused
because up to this point everything I've read has told me that a class should do one thing and one thing well and that is it. But now I'm getting into Threads and GUIs and it appears that one class is doing many things.
Thanks in advance,
[ October 12, 2007: Message edited by: Greg L Tonn ]