private void addListener() {

        loadFileButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {

                File file = FileHelper.selectFileForRead(UpPanel.this);

                if (file == null) {
                    return;
                }

                StateMachine.takeAction(Action.InitProgram);

                try {
                    data.setFile(file);
                    data.setFileContent(FileReadUtil.readBytes(file));

                    StateMachine.takeAction(Action.FileLoad);

                } catch (Exception ex) {

                    log.error("error when reading file.", ex);

                    StateMachine.takeAction(Action.InitProgram);
                }

            }
        });

        encodingList.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {

                String newEncoding = getExtEncoding();

                if (data.getEncoding().equals(newEncoding)) {
                    return;
                }

                data.setEncoding(newEncoding);

                StateMachine.takeAction(Action.ChangeEncoding);
            }
        });

        convertButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    File saveFile = FileHelper.selectFileForSave(UpPanel.this);

                    if (saveFile == null) {
                        return;
                    }

                    if (!data.hasFile()) {
                        return;
                    }
                    String oldEncoding = getExtEncoding();
                    String newEncoding = getConvertExtEncoding();

                    byte[] newData = ExtEncodingUtil.convertBytes(
                            data.getFileContent(), oldEncoding, newEncoding);

                    FileWriteUtil.save2File(saveFile, newData);

                } catch (Exception ex) {

                    log.error("error when convert file encoding.", ex);

                    JOptionPane.showMessageDialog(null, "error.",
                            "save error.", JOptionPane.ERROR_MESSAGE);
                }

            }
        });
    }