I'm trying to design an MV (Model-ViewController) application in Java swing. I'm having trouble with assigning the correct model to each ViewController.
Here's my current design (not the actual names) :
The idea is that I have two views : the Gui and a Midi Device.
Each view has its corresponding model. However, a part of the Gui (ButtonBar) needs to access the midi device model.
For now, my solution is to pass the MidiDevice model to the MainWindow's constructor, then let it pass it down to the MyPanel constructor, then to the ButtonBar... To me, that smells bad design and future complications.
What better way do you suggest ?