private void initButtonBar(){

        menuBarWithButtons = new JToolBar();

        menuBarWithButtons.setSize(this.getWidth(), MENU_BAR_WITH_BUTTONS_HEIGHT);
        menuBarWithButtons.setBorderPainted(true);
        menuBarWithButtons.setBorder(BorderFactory.createLineBorder(Color.gray, 1));


        JToggleButton mBarButtonOpen = new JToggleButton();

        ImageIcon iconButtonOpen = new ImageIcon(Main.ICO_PATH + "folder.png");
        mBarButtonOpen.setIcon(iconButtonOpen);
        mBarButtonOpen.setBorderPainted(false);
        mBarButtonOpen.setContentAreaFilled(false);
        mBarButtonOpen.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                openDialog();

            }
        });

        JToggleButton mBarButtonNew = new JToggleButton();

        ImageIcon iconButtonNew = new ImageIcon(Main.ICO_PATH + "page_white.png");
        mBarButtonNew.setIcon(iconButtonNew);
        mBarButtonNew.setBorderPainted(false);
        mBarButtonNew.setContentAreaFilled(false);
        mBarButtonNew.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                newWorkSpace();
            }
        });

        JToggleButton mBarButtonViewResult = new JToggleButton();

        ImageIcon iconButtonViewResult = new ImageIcon(Main.ICO_PATH + "document_inspector.png");
        mBarButtonViewResult.setIcon(iconButtonViewResult);
        mBarButtonViewResult.setBorderPainted(false);
        mBarButtonViewResult.setContentAreaFilled(false);
        mBarButtonViewResult.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                selResultRows = resultTable.getSelectedRows();
                Main.runResultView();
                Main.transferDataToResultView(listDataOut, selResultRows);
            }
        });

        JToggleButton mBarButtonEditDataBase = new JToggleButton();
        ImageIcon iconButtonEditDataBase = new ImageIcon(Main.ICO_PATH + "database_edit.png");
        mBarButtonEditDataBase.setIcon(iconButtonEditDataBase);
        mBarButtonEditDataBase.setBorderPainted(false);
        mBarButtonEditDataBase.setContentAreaFilled(false);
        mBarButtonEditDataBase.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                Main.runDataWindow();
            }
        });

        mBarButtonStop = new JToggleButton();
        ImageIcon iconButtonStop = new ImageIcon(Main.ICO_PATH + "stop.png");
        mBarButtonStop.setIcon(iconButtonStop);
        mBarButtonStop.setBorderPainted(false);
        mBarButtonStop.setContentAreaFilled(false);
        mBarButtonStop.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                TestRunner.stopTest();
            }
        });
        mBarButtonStop.setEnabled(false);


        final JToggleButton mBarButtonRun = new JToggleButton();
        ImageIcon iconButtonRun = new ImageIcon(Main.ICO_PATH + "resultset_next.png");
        mBarButtonRun.setIcon(iconButtonRun);
        mBarButtonRun.setBorderPainted(false);
        mBarButtonRun.setContentAreaFilled(false);
        mBarButtonRun.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e){
                mBarButtonStop.setEnabled(true);
            }
            @Override
            public void mouseClicked(MouseEvent e) {

                runTest();
            }
        });


        menuBarWithButtons.add(mBarButtonOpen);
        menuBarWithButtons.add(mBarButtonNew);
        menuBarWithButtons.addSeparator();
        menuBarWithButtons.add(mBarButtonRun);
        menuBarWithButtons.add(mBarButtonStop);
        menuBarWithButtons.add(mBarButtonViewResult);
        menuBarWithButtons.addSeparator();
        menuBarWithButtons.add(mBarButtonEditDataBase);
    }