All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.ibm.as400.vaccess.ErrorDialogAdapter
Most errors in the com.ibm.as400.vaccess package are reported using ErrorEvents rather than throwing exceptions. An ErrorDialogAdapter object is useful to give users feedback whenever an error occurs.
The component property is used to determine the frame that is to be the parent of message dialogs. If no component is set, then a default frame will be used.
The following example creates an explorer pane filled with the contents of a directory in the integrated file system of an AS/400. It will use an ErrorDialogAdapter object to display all errors in a message dialog.
// Set up the explorer pane. AS400ExplorerPane explorerPane = new AS400ExplorerPane (); // Set up the explorer pane to display the contents // of a directory. AS400 system = new AS400 ("MySystem", "Userid", "Password"); VIFSDirectory directory = new VIFSDirectory (system, "/myDirectory"); explorerPane.setRoot (directory); // Add the explorer pane to a frame. frame.add (explorerPane); // Set up the error dialog adapter. explorerPane.addErrorListener (new ErrorDialogAdapter (frame));
public ErrorDialogAdapter()
public ErrorDialogAdapter(Component component)
public void errorOccurred(ErrorEvent event)
public Component getComponent()
public void setComponent(Component component)
All Packages Class Hierarchy This Package Previous Next Index