private void synchronizeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_synchronizeButtonActionPerformed
        synchronizeButton.setEnabled(false);
        this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

        try {
                    final String sourceDir = sourceDirectoyField.getText();
                    final String targetDir = targetDirectoryField.getText();
                    if (sourceDir != null && targetDir != null) {
                        DirectorySyncer directorySyncer = new DirectorySyncer(sourceDir, targetDir, isSimulationMode);
                        Map<String, Path> targetMap = directorySyncer.buildTargetFileMap();
                        report = directorySyncer.findAndHandleSourcesInTargetMap(targetMap);
                        report = directorySyncer.cleanupDirs(report);
                        this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
                        new ReportDialog(MainFrame.this, false).setVisible(true);
                        //jDialog.setTitle("Syncing worked");
                    }
                //} catch (InterruptedException e) {
                //    interrupt();
                //    System.out.println("Unterbrechung in sleep()");
                } catch (IOException e1) {
                    JDialog jDialog = new JDialog(MainFrame.this);
                    jDialog.setTitle("Syncing failed");
                    this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
                    new ReportDialog(MainFrame.this, false).setVisible(true);
                } catch (Exception ex) {
                    System.out.println(ex.getMessage());
                    ex.printStackTrace();
                    this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
                }
    }//GEN-LAST:event_synchronizeButtonActionPerformed