@SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents()
  {

    okButton = new javax.swing.JButton();
    cancelButton = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    titleTextField = new javax.swing.JTextField();
    searchTextField = new javax.swing.JTextField();
    jSeparator1 = new javax.swing.JSeparator();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    replaceTextField = new javax.swing.JTextField();
    applyButton = new javax.swing.JButton();
    icon = new JButton()
    {
      @Override
      public void setIcon(Icon defaultIcon)
      {
        super.setIcon(defaultIcon);
        if (defaultIcon != button.getIcon())
        DatabaseSaver.save();
      }
    };
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    customSearchTextField = new javax.swing.JTextField();
    jLabel7 = new javax.swing.JLabel();
    directUrlTextField = new javax.swing.JTextField();
    removeButton = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Edit Album");
    setAlwaysOnTop(true);
    setBackground(new java.awt.Color(39, 39, 39));
    addWindowListener(new java.awt.event.WindowAdapter()
    {
      public void windowClosing(java.awt.event.WindowEvent evt)
      {
        closeDialog(evt);
      }
    });

    okButton.setBackground(removeButton.getBackground());
    okButton.setText("OK");
    okButton.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        okButtonActionPerformed(evt);
      }
    });

    cancelButton.setBackground(removeButton.getBackground());
    cancelButton.setText("Cancel");
    cancelButton.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        cancelButtonActionPerformed(evt);
      }
    });

    jLabel1.setFont(new java.awt.Font("Dialog", 1, 16)); // NOI18N
    jLabel1.setForeground(new java.awt.Color(255, 255, 255));
    jLabel1.setText("Title:");

    titleTextField.setBackground(new java.awt.Color(204, 204, 204));
    titleTextField.setText("jTextField1");
    titleTextField.setBorder(javax.swing.BorderFactory.createCompoundBorder(null, javax.swing.BorderFactory.createEmptyBorder(4, 5, 4, 5)));
    titleTextField.addCaretListener(new javax.swing.event.CaretListener()
    {
      public void caretUpdate(javax.swing.event.CaretEvent evt)
      {
        titleTextFieldCaretUpdate(evt);
      }
    });

    searchTextField.setBackground(new java.awt.Color(204, 204, 204));
    searchTextField.setBorder(titleTextField.getBorder());

    jLabel3.setFont(new java.awt.Font("Dialog", 1, 16)); // NOI18N
    jLabel3.setForeground(new java.awt.Color(255, 255, 255));
    jLabel3.setText("Replace in files:");

    jLabel4.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel4.setForeground(new java.awt.Color(216, 216, 216));
    jLabel4.setText("with");

    replaceTextField.setBackground(new java.awt.Color(204, 204, 204));
    replaceTextField.setBorder(titleTextField.getBorder());

    applyButton.setBackground(removeButton.getBackground());
    applyButton.setText("Apply");
    applyButton.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        applyButtonActionPerformed(evt);
      }
    });

    icon.setBackground(new java.awt.Color(89, 89, 89));
    icon.setForeground(new java.awt.Color(255, 255, 255));
    icon.setBorder(null);
    icon.setBorderPainted(false);
    icon.setContentAreaFilled(false);
    icon.setHideActionText(true);
    icon.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    icon.setMaximumSize(Utils.ICON_DIMENSION);
    icon.setMinimumSize(Utils.ICON_DIMENSION);
    icon.setPreferredSize(Utils.ICON_DIMENSION);
    icon.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

    jLabel5.setFont(new java.awt.Font("Dialog", 1, 16)); // NOI18N
    jLabel5.setForeground(new java.awt.Color(255, 255, 255));
    jLabel5.setText("Picture:");

    jLabel6.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel6.setForeground(new java.awt.Color(216, 216, 216));
    jLabel6.setText("Custom search:");

    customSearchTextField.setBackground(new java.awt.Color(204, 204, 204));
    customSearchTextField.setBorder(titleTextField.getBorder());
    customSearchTextField.setText("");

    jLabel7.setFont(new java.awt.Font("Dialog", 0, 12)); // NOI18N
    jLabel7.setForeground(new java.awt.Color(216, 216, 216));
    jLabel7.setText("Direct URL:");

    directUrlTextField.setBackground(new java.awt.Color(204, 204, 204));
    directUrlTextField.setBorder(titleTextField.getBorder());

    removeButton.setBackground((System.getProperty("os.name").equals("Linux")) ? new Color(150, 150, 150) : null);
    removeButton.setText("Remove");
    removeButton.addActionListener(new java.awt.event.ActionListener()
    {
      public void actionPerformed(java.awt.event.ActionEvent evt)
      {
        removeButtonActionPerformed(evt);
      }
    });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)
      .addGroup(layout.createSequentialGroup()
        .addContainerGap()
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addComponent(jLabel3)
              .addGroup(layout.createSequentialGroup()
                .addComponent(searchTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel4)))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(replaceTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addGroup(layout.createSequentialGroup()
            .addComponent(jLabel1)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(titleTextField))
          .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
            .addComponent(removeButton)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(applyButton)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(cancelButton))
          .addGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                  .addComponent(directUrlTextField, javax.swing.GroupLayout.Alignment.LEADING)
                  .addComponent(customSearchTextField))
                .addGap(25, 25, 25))
              .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                  .addComponent(jLabel7)
                  .addComponent(jLabel5)
                  .addComponent(jLabel6))
                .addGap(217, 217, 217)))
            .addComponent(icon, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)))
        .addContainerGap())
    );

    layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelButton, okButton});

    layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
        .addGap(18, 18, 18)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(jLabel1)
          .addComponent(titleTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
        .addComponent(jLabel3)
        .addGap(7, 7, 7)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(searchTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
          .addComponent(jLabel4)
          .addComponent(replaceTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addGroup(layout.createSequentialGroup()
            .addGap(23, 23, 23)
            .addComponent(jLabel5)
            .addGap(18, 18, 18)
            .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(customSearchTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(30, 30, 30)
            .addComponent(jLabel7)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(directUrlTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
          .addGroup(layout.createSequentialGroup()
            .addGap(34, 34, 34)
            .addComponent(icon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        .addGap(46, 46, 46)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
          .addComponent(cancelButton)
          .addComponent(okButton)
          .addComponent(applyButton)
          .addComponent(removeButton))
        .addContainerGap())
    );

    getRootPane().setDefaultButton(okButton);
    titleTextField.getAccessibleContext().setAccessibleName("");

    pack();
  }// </editor-fold>//GEN-END:initComponents