private void addActionForAdminButton() {
        adminButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent event) {
                JPanel panel = new JPanel();
                JLabel label = new JLabel(stringEnterPass);
                JPasswordField pass = new JPasswordField(10);
                panel.add(label);
                panel.add(pass);
                String[] options = new String[]{"OK", "Cancel"};
                int option = JOptionPane.showOptionDialog(null, panel, "Admin",
                        JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE,
                        null, options, options[0]);
                if (option == 0) // pressing OK button
                {
                    String password = new String(pass.getPassword());

                    if (stringTruePassword.equals(password)) {
                        ApplicationObjects.getInstance().setAdminLogged(true);
                        lbPrihlasen.setVisible(true);
                        lbUserName.setVisible(true);
                    } else {
                        ApplicationObjects.getInstance().setAdminLogged(false);
                    }
                    if (DEBUG) {
                        System.out.println("Your password is: " + password);
                    }
                }
            }
        });
    }