private void addActions(){
        JButton buttonOK = noteEditorFrame.getButtonOK();
        buttonOK.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                ICommand command = new EditNoteCommand();
                command.execute();
                noteEditorFrame.setVisible(false);
                instance = null;
            }
        });

        JButton buttonCancel = noteEditorFrame.getButtonCancel();
        buttonCancel.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                noteEditorFrame.setVisible(false);
                noteEditorFrame = null;
            }
        });

        JButton buttonEditFile = noteEditorFrame.getButtonEditFile();
        buttonEditFile.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                ICommand command = new EditFileCommand();
                command.execute();

            }
        });
    }