How do you usually manage callbacks in Java using Swing library?
- by none
I'm quite new to the Java Swing programming, and GUI development as well.
As a beginner, I'm currently reading Design Pattern, but finding what I'm looking for is quite hard, most of the times.
So far, I've never had huge problems defining a view hierarchy - I just use to subclass component from component. But the hard-to-do here is how managing callbacks, which often become hard to maintain due to the hard code.
During my last projects, I tried to separate GUI, Listener and Callbacker objects which cooperated together, but in this way it was really hard adding new features.
So, which kind of best patterns or best practices do you tend to use when trying to maintain, add new features or even worst avoid to hard-code classes which manage callbacks method in this kind of frameworks (mainly Java Swing)?