Supposed there is an application with multiple windows, like:

Logo splashscreen Connecting... screen Login-usercontrols screen Logging in... screen etc.

Is there a design pattern, which allows to effectively manage all those windows? (to hide previous windows, display a new window etc.)

  • Questions about a specific technology stack are better asked on StackOverflow. – thorsten müller Oct 8 '12 at 8:07
  • Ok, I will delete the SWT. The question is about a pattern. – Skip Oct 8 '12 at 8:09
  • As @thorstenmüller already mentioned, implementation questions are more suitable for Stack Overflow, but you already posted the question there. Please don't post exactly the same question on multiple sites, and give our FAQ a thorough read to see what questions we welcome on Programmers. – yannis Oct 8 '12 at 8:10
  • If you do update your question to be in accordance with our FAQ, please flag it for moderation attention so we can review and re-open it. – yannis Oct 8 '12 at 8:11
  • 2
    I believe there are no patterns for this. It all heavily depends on GUI stack, OS and what exactly do you want your windows to do. – Euphoric Oct 8 '12 at 8:53

Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.

As an example, consider the implementation of a dialog box to present a collection of widgets such as buttons, menus, and entry fields. There may be dependencies between the widgets in the dialog, e.g., selecting an entry in a list box might change the contents of an entry field.

Such dependencies can be reduced by encapsulating collective behavior in a mediator object. A mediator is responsible for controlling and coordinating the interactions of these objects. The mediator acts as an intermediary and keeps objects in the group from referring to each other explicitly. The objects only know the mediator, thus reducing the number of interconnections.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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