This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Posted by Alex Pushkin on 23 Nov 1998, 3:41 AM
Just a little though on composition:
One of its advantages would be to 'hide' methods of the super
class to the users. For instance, when implementing a dialog
with specific layout and very well specified behaviour,
you probably don't people being able to use the add() method.
Instead, very few super class methods should be made available.
Creating a new object could automatically pack and show the
dialog (implementing a start() method could be another option).