protected char getQuotesCharacter() {
   return quoteCharacterTextField.getCharacter();
 }
 protected char getEscapeCharacter() {
   return escapeCharacterTextField.getCharacter();
 }
  {
    trimLinesBox.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            settingsChanged();
          }
        });
    skipCommentsBox.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            commentCharacterTextField.setEnabled(skipCommentsBox.isSelected());
            settingsChanged();
          }
        });

    commentCharacterTextField.addKeyListener(
        new KeyListener() {
          @Override
          public void keyPressed(KeyEvent e) {}

          @Override
          public void keyReleased(KeyEvent e) {
            settingsChanged();
          }

          @Override
          public void keyTyped(KeyEvent e) {}
        });
    useFirstRowAsColumnNamesBox.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            settingsChanged();
          }
        });
    useQuotesBox.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            quoteCharacterTextField.setEnabled(useQuotesBox.isSelected());
            escapeCharacterTextField.setEnabled(useQuotesBox.isSelected());
            settingsChanged();
          }
        });

    quoteCharacterTextField.addKeyListener(
        new KeyListener() {
          @Override
          public void keyPressed(KeyEvent e) {}

          @Override
          public void keyReleased(KeyEvent e) {
            settingsChanged();
          }

          @Override
          public void keyTyped(KeyEvent e) {}
        });

    escapeCharacterTextField.addKeyListener(
        new KeyListener() {
          @Override
          public void keyTyped(KeyEvent e) {}

          @Override
          public void keyReleased(KeyEvent e) {
            settingsChanged();
          }

          @Override
          public void keyPressed(KeyEvent e) {}
        });
    regexButton.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            regexTextField.setEnabled(regexButton.isSelected());
            settingsChanged();
          }
        });

    ButtonGroup buttonGroup = new ButtonGroup();
    buttonGroup.add(commaButton);
    buttonGroup.add(semicolonButton);
    buttonGroup.add(spaceButton);
    buttonGroup.add(tabButton);
    buttonGroup.add(regexButton);

    ActionListener listener =
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            settingsChanged();
          }
        };
    commaButton.addActionListener(listener);
    semicolonButton.addActionListener(listener);
    spaceButton.addActionListener(listener);
    tabButton.addActionListener(listener);
    regexButton.addActionListener(listener);
    regexTextField.addKeyListener(
        new KeyListener() {
          private Timer timer =
              new Timer(
                  2000,
                  new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                      timer.stop();
                      settingsChanged();
                    }
                  });

          @Override
          public void keyPressed(KeyEvent e) {}

          @Override
          public void keyReleased(KeyEvent e) {
            timer.stop();
            timer.start();
            //				settingsChanged();
          }

          @Override
          public void keyTyped(KeyEvent e) {}
        });
  }