private void renderBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_renderBrowseButtonActionPerformed
        JFileChooser f = new JFileChooser(renderToField.getText());
        File fi = new File(renderToField.getText());
        if(fi.isDirectory()) {
            f.setCurrentDirectory(fi);
        }
        else {
            f.setSelectedFile(fi);
        }
        f.setDialogTitle("Render To File");
        class GIFFileFilter extends FileFilter {
            public boolean accept(File f) {
                if (f.isDirectory()) return true;
                return f.getName().toLowerCase().endsWith("gif");
            }
            public String getDescription()
            {
                return "GIF files";
            }
        }
        f.addChoosableFileFilter(new GIFFileFilter());
        f.setFileSelectionMode(JFileChooser.FILES_ONLY);
        int result = f.showSaveDialog(this);
        if (result == JFileChooser.APPROVE_OPTION) {
            fi = f.getSelectedFile();
            String s = fi.getPath();
            if(!s.equals("")) {
                if (!s.endsWith(".gif")) {
                    s = s + ".gif";
                }
                renderToField.setText(s);
            }
        }
    }//GEN-LAST:event_renderBrowseButtonActionPerformed