try { if (FileSystemStore.isExistingSession(dir)) { FileSystemStore store = new FileSystemStore(dir); _framework.setSessionStore(store); } else { System.err.println("No session found in " + dir); } } catch (StoreException se) {  System.err.println("Error loading session : " + se);
if (loadSession(dir)) { _defaultDir = jfc.getCurrentDirectory();
    private void openMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openMenuItemActionPerformed        saveSessionData();        JFileChooser jfc = new JFileChooser(_defaultDir);        jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);        jfc.setDialogTitle("Choose a directory that contains a previous session");        int returnVal = jfc.showOpenDialog(this);        if (returnVal == JFileChooser.APPROVE_OPTION) {            File file = jfc.getSelectedFile();            String dir = file.toString() + System.getProperty("file.separator");            try {                if (FileSystemStore.isExistingSession(dir)) {                    FileSystemStore store = new FileSystemStore(dir);                    _framework.setSessionStore(store);                } else {                    System.err.println("No session found in " + dir);                }            } catch (StoreException se) {                // pop up an alert dialog box or something                System.err.println("Error loading session : " + se);            }        }        _defaultDir = jfc.getCurrentDirectory();    }//GEN-LAST:event_openMenuItemActionPerformed