One way patterns help is by introducing you to new tricks and techniques that can be used in other places, even though the patterns may not even be used.
This is just too complicated. The correct, simpler solution (at least simpler for the client programmer who actually has to use this class) is to wrap a
Dialog object inside another class, then construct it and display it through a static method like this:
The use of a static method to create instances that are otherwise hidden in an object's private areas is found in almost every creational
pattern including Singleton and Factory Method.
This solution does not use the Singleton
or Factory Method patterns,
but it uses the concepts learned from these patterns.