Conclusion

So that's the high-level design. It achieves my primary purpose—decoupling the layout of a form from the classes that are displayed on the form (pretty elegantly if I do say so myself). You can radically change the layout of a Form and the objects displayed on it are completely unaffected. They don't even know that the Form has been changed. The flip side is also true; you can radically change the implementation of some class, and the Forms on which objects of that class are displayed are equally unaffected. The result is much easier maintenance.

In an upcoming issue, I'll continue this article by looking at the lower-level design details of the Forms package and the actual implementation as well, so stay tuned.

To obtain complete source code listings, see page 5.