private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // declare JFileChooser
        JFileChooser fileChooser = new JFileChooser();

        // let the user choose the destination file
        if (fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
            // indicates whether the user still wants to export the settings
            boolean doExport = true;

            // indicates whether to override an already existing file
            boolean overrideExistingFile = false;

            // get destination file
            File destinationFile = new File(fileChooser.getSelectedFile().getAbsolutePath());

            // check if file already exists
            while (doExport && destinationFile.exists() && !overrideExistingFile) {
                // let the user decide whether to override the existing file
                overrideExistingFile = (JOptionPane.showConfirmDialog(this, "Replace file?", "Export Settings", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION);

                // let the user choose another file if the existing file shall not be overridden
                if (!overrideExistingFile) {
                    if (fileChooser.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
                        // get new destination file
                        destinationFile = new File(fileChooser.getSelectedFile().getAbsolutePath());
                    } else {
                        // seems like the user does not want to export the settings any longer
                        doExport = false;
                    }
                }
            }

            // perform the actual export
            if (doExport) {
                try {
                    try (BufferedWriter out = new BufferedWriter(new FileWriter(destinationFile))) {
                        out.write(consoleText.getText());
                    }
                } catch (IOException ex) {
                    Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
    }//GEN-LAST:event_jMenuItem2ActionPerformed