'Swing GUI Development with Spring
Are there any decent tutorials out there for building Swing GUI applications using Spring (v3 preferably)?
Solution 1:[1]
It is possible, but if you want to work with a GUI-builder, you can't initialize any GUI composites by spring. So you can't use such things like dependency injection! Spring managed beans must be get out of the spring context manually.
I did this years ago, so i guess, it is currently the correct way! I had a global/static InitializationManager which initializes and holds the spring context. When I need a bean managed by spring, I called a static method of the InitializationManager public static <T> T getBean(final Class<T> requiredType).
Not very elegant, but it works stable!
Hope this helps after the long time.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Thilo Schwarz |
