private void createMenuBar() {
        menuBar = new JMenuBar();



        JMenu fileMenu = new JMenu("Menu");
        JMenuItem scoresMenuItem = new JMenuItem("Najlepsze wyniki");
        JMenuItem loginMenuItem = new JMenuItem("Zaloguj");
        JMenuItem registerMenuItem = new JMenuItem("Rejestruj");
        JMenuItem exitItem = new JMenuItem("Exit");


        JMenu showMenu = new JMenu("Rozmiar planszy");

        final JCheckBoxMenuItem smallSize = new JCheckBoxMenuItem("8 kart");
        final JCheckBoxMenuItem mediumSize = new JCheckBoxMenuItem("12 kart");
        final JCheckBoxMenuItem bigSize = new JCheckBoxMenuItem("16 kart");
        smallSize.setSelected(true);

        showMenu.add(smallSize);
        showMenu.add(mediumSize);
        showMenu.add(bigSize);
        fileMenu.add(showMenu);


        fileMenu.add(scoresMenuItem);
        fileMenu.add(loginMenuItem);
        fileMenu.add(registerMenuItem);
        fileMenu.addSeparator();
        fileMenu.add(exitItem);



        smallSize.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JCheckBoxMenuItem item = (JCheckBoxMenuItem) e.getSource();
                recreateBoard(8);
                mediumSize.setSelected(false);
                bigSize.setSelected(false);
            }
        });

        mediumSize.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JCheckBoxMenuItem item = (JCheckBoxMenuItem) e.getSource();
                recreateBoard(12);

                smallSize.setSelected(false);
                bigSize.setSelected(false);
            }
        });

        bigSize.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JCheckBoxMenuItem item = (JCheckBoxMenuItem) e.getSource();
                recreateBoard(16);
                smallSize.setSelected(false);
                mediumSize.setSelected(false);
            }
        });


        // logowanie
        loginMenuItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if(loginDialog.isVisible()) {
                    loginDialog.setVisible(false);
                } else {
                    loginDialog.setVisible(true);
                }
            }
        });

        // rejestracja
        registerMenuItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                if(registerDialog.isVisible()) {
                    registerDialog.setVisible(false);
                } else {
                    registerDialog.setVisible(true);
                }
            }
        });


        //najlepsze wyniki
        ArrayList<String> users = new ArrayList<String>();
        users.add("pgol");
        users.add("mysiaczkaa");
        users.add("marcin");

        ArrayList<Integer> scores = new ArrayList<Integer>();
        scores.add(1);
        scores.add(2);
        scores.add(3);

        ArrayList<String> topScores = new ArrayList<String>();
        topScores = scoresDialog.buildScores(users, scores);


        scoresDialog.addScores(topScores);

        scoresMenuItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                scoresDialog.setVisible(true);
            }
        });

        exitItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                int action = JOptionPane.showConfirmDialog(gameBoard, "Czy napewno chcesz wyjsc z tej niesamowitej gry", "Wyjdz", JOptionPane.OK_CANCEL_OPTION);

                if(action == JOptionPane.OK_OPTION) {
                    System.exit(0);
                }


            }
        });


        menuBar.add(fileMenu);


        add(menuBar, BorderLayout.NORTH); // TODO check this
    }