/**
   * Put the properties of this component that shall be persisted at application exit to the
   * application {@link Config}
   */
  private void saveSettings() {
    GUI gUI = configuration.getgUI();

    Rectangle sizeAndLocation = gUI.getImageConflictViewer().getSizeAndLocation();

    sizeAndLocation.setLocation(this.getLocationOnScreen().x, this.getLocationOnScreen().y);
    sizeAndLocation.setSize(this.getSize().width, this.getSize().height);
  }
  /** Creates the main window and configures it according to persisted configuration. */
  public void createMainFrame() {

    GUI gUI = configuration.getgUI();

    Rectangle sizeAndLocation = gUI.getImageConflictViewer().getSizeAndLocation();

    this.setSize(sizeAndLocation.getSize());

    Point xyFromConfig = new Point(sizeAndLocation.getLocation());

    if (Screen.isVisibleOnScreen(sizeAndLocation)) {
      this.setLocation(xyFromConfig);
      this.setSize(sizeAndLocation.getSize());
    } else {
      JOptionPane.showMessageDialog(
          null,
          lang.get("errormessage.maingui.locationError"),
          lang.get("errormessage.maingui.errorMessageLabel"),
          JOptionPane.ERROR_MESSAGE);
      logger.logERROR(
          "Could not set location of Image Conflict Viewer GUI to: x = "
              + xyFromConfig.x
              + " and y = "
              + xyFromConfig.y
              + " since that is outside of available screen size.");

      this.setLocation(0, 0);
      this.setSize(
          GUIDefaults.IMAGE_CONFLICT_VIEWER_WIDTH, GUIDefaults.IMAGE_CONFLICT_VIEWER_HEIGHT);
    }

    try {
      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
      logger.logERROR("Could not set desired Look And Feel for Image Conflict Viewer GUI");
      logger.logERROR(e);
    }

    this.setTitle(lang.get("imagemerge.gui.conflict.viewer.title"));
    this.setModalityType(ModalityType.APPLICATION_MODAL);
    this.getContentPane().add(this.createThumbNailsBackgroundPanel(), BorderLayout.CENTER);
  }