public void setCatalog ( String location ) { CatalogBuilder builder = new CatalogBuilder ( ) ; try { Catalog cat = builder . buildFromLocation ( location , null ) ; setCatalog ( cat ) ; } catch ( Exception ioe ) { JOptionPane . showMessageDialog ( this , "Error opening catalog location " + location + " err=" + builder . getErrorMessage ( ) ) ; } }
Set the InvCatalog to display . The catalog is read asynchronously and displayed if successfully read . You must use a PropertyChangeEventListener to be notified if successful .