concept ErrorDialog in category java

appears as: ErrorDialog
Swt/Jface in Action: GUI Design with Eclipse 3.0

This is an excerpt from Manning's book Swt/Jface in Action: GUI Design with Eclipse 3.0.

Error dialogs are in many ways similar to MessageDialogs, in that they display an error message to the user. You can mimic an ErrorDialog by creating a MessageDialog with type ERROR. However, the ErrorDialog allows you to display more in-depth error details by using the IStatus interface. IStatus holds a detailed message and information about the severity of each error that has occurred. The result can be seen in figure 10.6.

Figure 10.6. An error dialog with multiple instances of IStatus

The error dialog shown in figure 10.6 is created with the following code. We create an instance of ErrorDialog and pass it an IStatus object that holds error information. The root IStatus holds several other instances of IStatus that provide increasingly granular details about the errors:

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest