code: public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
          if (bean instanceof ApplicationWindowAware) {
              ((ApplicationWindowAware)bean).setApplicationWindow(window);
          }
          return bean;
      }
docs: If the given bean is an implementation of {@link ApplicationWindowAware}, it will have its
  application window set to the window provided to this instance at construction time.