Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm rewriting my game now using software designing patterns and want to do the code, most correct I can. While implementing MVC(Model View Controller) I got a question which I would like to discuss or to hear some opinions of experts. The question is about management of unused frames... For example next sequence of windows: ResourceLoadingWindow -> LoginWindow -> GameWindow Definetly that I don't want to reuse ResourceLoadingWindow , since I'm using Java Applet and I don't see any situation when I will need to reuse it. The different story is about LoginWindow, which can be reused a lot of times, because some player would want to Logout and come back again in few minutes for example. I would like to know, following the MVC structure, should I destroy window, removing it from ContentPane or just hide? Maybe I need to unregister it from controller or I shouldn't do so?

Thanks in adavance.

share|improve this question

I'd say hide it. Then it's loaded and you can just call it whenever. If you're changing accounts then why load another copy, right? It's pretty lightweight though, I bet, so use whichever is easiest for now.

share|improve this answer
Well I was discussing MVC implementation on Stackoverflow and it seems (in my case) it more reasonable to create and destroy unused frames always. But anyways thanks for advice. – Serhiy Apr 11 '11 at 22:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.