private void initMenuBar(){
        menu = new JMenuBar();
        menu.setSize(frame.getWidth(), 25);
        JMenu menuFile = new JMenu("File");
        ImageIcon openIcon = new ImageIcon(Main.icoPath + "folder_open_icon.png");
        JMenuItem itemOpen = new JMenuItem("Open new dictionary    ",openIcon);
        itemOpen.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                words = null;
                Main.clearList();
                File temp = importingFile;
                showFileOpenDialog();
                if((importingFile != null) && (importingFile != temp)){
                    setWords();
                    setQuestion();
                    bAddToRepetition.setEnabled(true);
                    bNext.setEnabled(true);
                    bAnswer.setEnabled(true);
                }

            }
        });
        ImageIcon importIcon = new ImageIcon(Main.icoPath+"import_icon.png");
        JMenuItem itemImport = new JMenuItem("Add dictionary  ", importIcon);
        itemImport.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                File temp = importingFile;
                showFileOpenDialog();
                if((importingFile != null) && (importingFile != temp)){
                    setWords();
                    setQuestion();
                    bNext.setEnabled(true);
                    bAnswer.setEnabled(true);
                }
            }
        });

        menuFile.add(itemOpen);
        menuFile.add(itemImport);

        JMenu menuEdit = new JMenu("Edit");
        ImageIcon editorIcon = new ImageIcon(Main.icoPath+"folder_open_icon.png");
        JMenuItem itemEditor = new JMenuItem("Database editor",editorIcon);
        itemEditor.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                 Main.runEditorFrame();
            }
        });

        menuEdit.add(itemEditor);

        ImageIcon noteEditIcon = new ImageIcon(Main.icoPath + "billiard_marker.png");
        JMenuItem itemNoteEdit = new JMenuItem("Edit note", noteEditIcon);
        itemNoteEdit.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                NoteEditorController noteEditorController = NoteEditorController.getInstance();
            }
        });

        menuEdit.add(itemNoteEdit);

        menu.add(menuFile);
        menu.add(menuEdit);
        frame.add(menu, BorderLayout.NORTH);
    }