posted 13 years ago
I have carried out a bit of refactoring on the project.
The controller will create the view through composition.
Currently I have a number of sub panels in the view and these are implemented as singletons.
So when one panel wanted to change the appearance of a component on another panel they would call.
from within its own panel.
Q1. Should each panel be a singleton, I am thinking not.
Q1a. If one component wants to change another should this done through the controller?
In the view there are JSplitPane which contain JSplitPane and so on.
Q2. In the top level view creation class GameView should I have a reference to all of these sub components, e.g
GameView contains all the sub containers and components,
Q3. In the code below should I have the addMouseListener for a panel.