March 2002
Intermediate to advanced
496 pages
8h 51m
English
To complete the factory design, you have to establish how the prototypical instance variables in a UIKit object will copy themselves. You consider using clone(), a method that every class inherits from Object. However, this method must be used with caution; it does not provide foolproof copying of an object.
|
Consider copying an OzTextArea object. When you investigate this class, you see that it is a subclass of JPanel, as Figure 18.2 shows.
Subclassing from JPanel lets OzTextArea objects uniformly wrap their contents ...
Read now
Unlock full access