code: private void _saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event__saveActionPerformed
          JFileChooser fc = new JFileChooser(new File("R.log"));
          if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION && fc.getSelectedFile() != null) {
              FileOutputStream os = null;
              try {
                  os = new FileOutputStream(fc.getSelectedFile());
                  os.write(jTextPane1.getText().getBytes());
                  os.flush();
              } catch (Exception e) {
                  e.printStackTrace();
              } finally {
                  try {
                      os.close();
                  } catch (Exception ee) {
                      ee.printStackTrace();
                  }
              }
          }
  }
docs: GEN-LAST:event__delActionPerformed