title: Java Swing: how do I properly instantiate GUI and pass domain objects?
body: <p>I have a GUI with nested panels(tabbed with nested panels and etc). I need to pass domain object to deeply nested panel. I can think of two ways:</p>
  
  <ul>
  <li><p>Instantiate all gui objects in one place, like frame class. That
  would make passing domain objects dead simple, but Frame class will
  be huge and hardly maintanable.</p></li>
  <li><p>Each panel has its own class, where we instantiate and layout its<br>
  components. Now its easy to maintain and classes are clean, but how<br>
  do I pass down the chain my domain objects? I dont want to chain-pass
  them through constructors of panels that shouldn't even know their<br>
  existance. And top level panels would have a ton of these objects to 
  start with.</p></li>
  </ul>
  
  <p>Niether way seems like a soulution. How do you usually aproach this?</p>