Original Post
Let''s say I have a some gui components: Component, FrameWindow, Button.
The Component is the base class of FrameWindow and Button. The Component class is responsible for handing the hierarchy for the gui objects. However, I run into a snag.
The Component class has methods for adding child components and setting the parent component. But I shouldn''t be able to add a FrameWindow object to a Button object, because that doesn''t make any sense. Is this a problem with the design of the hierachy? Or should I add special code for handling these cases?
Any help greatly appreciated.
Kory
