docs: private void runBatchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_runBatchButtonActionPerformed
          // Perform batch encoding
          String thisData = "";
          String extension;
          String fullFileName;
          String outputCount;
          int inputCount = 0;
          String errorLog;
          String progressLog = "";
          int i, k;
          int lineCount = 0;
          double percentage;
          int countLength, currentLength;
  
          errorLog = "Starting batch process..." + '\n';
          batchOutputArea.setText(errorLog);
  
          switch(outFormatCombo.getSelectedIndex()) {
              case 0:
                  extension = ".png";
                  break;
              case 1:
                  extension = ".jpg";
                  break;
              case 2:
                  extension = ".gif";
                  break;
              case 3:
                  extension = ".bmp";
                  break;
              case 4:
                  extension = ".svg";
                  break;
              case 5:
              default:
                  extension = ".eps";
                  break;
          }
  
          for(i = 0; i < sequenceArea.getText().length(); i++) {
              if (sequenceArea.getText().charAt(i) == '\n') {
                  inputCount++;
              }
          }
  
          countLength = Integer.toString(inputCount + 1).length();
  
          for(i = 0; i < sequenceArea.getText().length(); i++) {
              if (sequenceArea.getText().charAt(i) == '\n') {
                  currentLength = Integer.toString(lineCount + 1).length();
                  outputCount = "";
                  for (k = 0; k < (countLength - currentLength); k++) {
                      // Add leading zeroes to file name
                      outputCount += "0";
                  }
                  outputCount += Integer.toString(lineCount + 1);
                  if (!thisData.equals("")) {
                      if (outFilenameCombo.getSelectedIndex() == 0) {
                          fullFileName = folderField.getText() + prefixField.getText()
                              + osFriendly(thisData) + extension;
                      } else {
                          fullFileName = folderField.getText()
                                  + prefixField.getText() + outputCount + extension;
                      }
                      File file = new File(fullFileName);
                      SaveSymbol saveSymbol = new SaveSymbol();
  
                      saveSymbol.removeAll();
  
                      saveSymbol.setSize(saveSymbol.getPreferredSize());
                      saveSymbol.setBorder(BorderFactory.createEmptyBorder());
                      saveSymbol.setBackground(paperColour);
                      try {
                          SaveImage saveImage = new SaveImage();
                          if (errorLabel.getText().isEmpty()) {
                              saveImage.save(file, saveSymbol);
                          } else {
                              errorLog += errorLabel.getText() + " at line " + (lineCount + 1) + '\n';
                          }
                      } catch (IOException e) {
                          errorLog += "I/O exception writing to " + fullFileName
                                  + " at line " + (lineCount + 1) + ": " + e.getMessage() + '\n';
                      }
                  }
                  lineCount++;
                  percentage = (double)(lineCount) / (double)(inputCount);
                  percentage *= 100;
                  progressLog = "Completed line " + lineCount + " of "
                          + inputCount + " (" + (int)(percentage) + "% done)";
                  batchOutputArea.setText(errorLog + progressLog);
                  thisData = "";
              } else {
                  char currentChar = sequenceArea.getText().charAt(i);
  
                  if ((currentChar != 0x0D) && (currentChar != 0x0A)) {
                      thisData += sequenceArea.getText().charAt(i);
                  }
              }
          }
          progressLog += '\n' + "Finished!";
          batchOutputArea.setText(errorLog + progressLog);
      }