While working on my hobby projects i split code in to background operations and gui operations. So i end up having library objects that does the actual work and gui objects that represent menus, frames and such. The thing that bugs me every time is that i end up having lots of objects that has to know about other objects. Such as toolbar object needs to know about the mainframe and main menu needs to know about both frame and toolbar so i end up passing references to lots of objects through constructors. While it works i can not imagine windows or darwin code passing 100 references to other components.
So my question is what is the preferred way of keeping objects with out passing a bunch of references to each other?