March 2002
Intermediate to advanced
496 pages
8h 51m
English
| SOLUTION 13.1 | The BorderFactory class in javax.swing is a good example of FLYWEIGHT. As its class comment says, “Wherever possible, this factory will hand out references to shared Border instances.” When a Border object can be safely shared, BorderFactory will return the same border more than once. For example, every call to createEmptyBorder() will return the same, empty border. |
| SOLUTION 13.2 |
|
Read now
Unlock full access