How do you usually manage callbacks in Java using Swing library?

Posted by none on Programmers See other posts from Programmers or by none
Published on 2013-10-16T15:53:04Z Indexed on 2013/10/18 16:12 UTC
Read the original article Hit count: 192

Filed under:
|
|

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)?

© Programmers or respective owner

Related posts about java

Related posts about design-patterns