line=lineNumber;
}//GEN-LAST:event_jTextArea1MouseReleased
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
if (fieldsAreOk()) {
PdfFileRule pdfFileRule = new PdfFileRule(Integer.toString(line), pattern, destinationFolder, sourceFolder);
try {
application.savePdfRule(pdfFileRule);
} catch (RuleAlreadyExistsException ex) {
Logger.getLogger(RuleConfig.class.getName()).log(Level.SEVERE, "Regel kan ikke gemmes... "+ex.getMessage(), ex);
JOptionPane.showMessageDialog(this, "Denne regel findes allerede.");