I'm writing an application (for my OCMJD) using Swing and MVC (using three distinct classes). I want to load and save the window state such as location and size when the application starts and stops. The settings are very specific to Swing and therefore wouldn't be suitable to keep it in the model so should this code be in the Controller or the View? My gut feeling is to put it in the View but I'm looking for some advice from the more experienced coders out there.
I've used the ViewHandlerpattern in combination with the Model-View-Controller.
I read about it in Pattern Oriënted Software Architecture vol. 1, but I'm sure you could find a description of it online somewhere.
It's usually applied in the context of an mulit-view / multi document interface, and the ViewHandler is responsible for opening and keeping track of views, updating them and disposing of them when necessary. I guess it could also be made responsible for persisting a view's state as it gets disposed.
Edit: the links to the ViewHandler class are added automatically, I didn't inted for that to happen.
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.