public void InitGUIElements() { wnd = factory.CreateWindow(); button = factory.CreateButton(); //... }