March 2002
Intermediate to advanced
496 pages
8h 51m
English
A facade class may have all static methods, as is the case with the SwingFacade class provided in the solutions. Such a class is called a utility in UML (Booch, Rumbaugh, and Jacobson 1999). A demo is an example that shows how to use a class or a subsystem. As such, demos provide much of the same value as facades.
|
The javax.swing package contains JOptionPane, a class that “makes it easy to pop up a standard dialog box,” according to the class comment.
For example, the following code displays and redisplays a dialog until the user clicks the Yes button (see Figure 4.5):
package com.oozinoz.applications; import javax.swing.*; public class ShowOptionPane ...
Read now
Unlock full access