MessageDialog, QuestionDialog, and YesNoDialog all extend WorkDialog, and all provide the means to add not only text to the dialog, but an image as well. Figure 22-2 shows instances of MessageDialog, QuestionDialog, and YesNoDialog doing their thing.
Naturally, we don't want to reimplement the code for placing an image next to a panel in each dialog class, so that functionality is embedded in the Postcard class, which is listed in Example 22-4.
import java.awt.*; public ...