private void runScriptMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
        String filename = null;
        
        if (fileChooser.showOpenDialog(this) != JFileChooser.APPROVE_OPTION) {
            return;
        }
        
        File file = fileChooser.getSelectedFile();
        filename = file.toString();
        
        try {
            String language = bsfManager.getLangFromFilename(filename);
            BufferedReader scriptReader = new BufferedReader(
                new FileReader(fileChooser.getSelectedFile()));
            String temp = new String();
            String script = new String();
            while ((temp = scriptReader.readLine()) != null) {
                script += temp + "\n";
            }
            bsfManager.exec(language, filename, 0, 0, script);
        } catch (BSFException bsfe) {
            cat.error("Failed to execute the script " + filename + 
                " because of exception ", bsfe);
        } catch (java.io.FileNotFoundException fnfe) {
            cat.error("Unable to find the file " + filename);
        } catch (java.io.IOException ioe) {
            cat.error("Error reading " + filename);
        }
    }