JFileChooser chooser = new JFileChooser(currentDirectory);
JFileChooser chooser = createFileChooser();
    private void openProjectItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openProjectItemActionPerformed                if (!closeProjectHook(getCurrentProject(), "Open Project"))            return;                JFileChooser chooser = new JFileChooser(currentDirectory);        chooser.setFileFilter(projectFileFilter);        int result = chooser.showOpenDialog(this);        if (result == JFileChooser.CANCEL_OPTION)            return;        try {            File file = chooser.getSelectedFile();            currentDirectory = file.getParentFile();            Project project = new Project(file.getPath());            FileInputStream in = new FileInputStream(file);            project.read(in);            setProject(project);        } catch (IOException e) {            logger.logMessage(ConsoleLogger.ERROR, "Could not open project: " + e.getMessage());        }    }//GEN-LAST:event_openProjectItemActionPerformed