Saturday, 16 January 2010

Menus sorted, I think!

Well they seem sorted for now. I have my main control object, which owns the list of running editors, and is responsible for building a common Window JMenu for all editors. Theory seems to be working ok, I could do away with the JFrame the control object has, as it's really only there at the moment to do a File->New and then off we go - that could get called from within the constructor or main() once the control object is up and running.

Going to explore collections next, i.e. whats the best Java constructs for keeping a list of open windows etc. At the moment I'm thinking when we launch a new editor we give it an index number which it supplies whenever calling back to the control object when e.g. it changes open filename, or closes down, so we can housekeep the window JMenu.

No comments:

Post a Comment