public static void openSettingsPanel(final JFrame parentFrame) {
        JPanel message = new JPanel(new GridBagLayout());
        GridBagConstraints f = new GridBagConstraints();
        GridBagConstraints s = new GridBagConstraints();
        f.gridx = 0;
        s.gridx = 1;
        f.insets = s.insets = new Insets(2, 2, 2, 2);
        f.ipady = s.ipady = 10;
        f.fill = s.fill = GridBagConstraints.BOTH;
        
        message.add(new JLabel("Player name:"), f);
        final JTextField nametf = new JTextField((String) settings.get(NAME)) {
            @Override
            public void paste() {} // do not let paste anything
        };
        nametf.setHorizontalAlignment(JTextField.CENTER);
        nametf.addKeyListener(new KeyAdapter() {
            @Override
            public void keyTyped(KeyEvent e) {
                if (("" + e.getKeyChar()).matches("\\W")) {
                    e.consume();
                    Toolkit.getDefaultToolkit().beep();
                    nametf.setToolTipText("only characters, digits and _");
                    ToolTipManager.sharedInstance().mouseMoved(
                            new MouseEvent(nametf, 0, 10, 0,
                            10, 10, // X-Y of the mouse for the tool tip
                            0, false));
                } else if (nametf.getText().length() == 15) {
                    e.consume();
                    Toolkit.getDefaultToolkit().beep();
                    nametf.setToolTipText("max 15 characters");
                    ToolTipManager.sharedInstance().mouseMoved(
                            new MouseEvent(nametf, 0, 10, 0,
                            10, 10, // X-Y of the mouse for the tool tip
                            0, false));
                }
            }
        });
        message.add(nametf, s);
        
        message.add(new JLabel("Active deck:"), f);
        tempDeck = (File) settings.get(DECK);
        final JButton deckButton = new JButton(
                Utilities.getName((File) settings.get(DECK)));
        deckButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JFileChooser jfc = new JFileChooser(Main.DECKS);
                jfc.setMultiSelectionEnabled(false);
                jfc.setFileFilter(new FileFilter() {
                    @Override
                    public boolean accept(File f) {
                        return f.isDirectory()
                                || Utilities.getExtension(f).equals("txt");
                    }
                    @Override
                    public String getDescription() {
                        return "*.txt";
                    }
                });
                if (jfc.showOpenDialog(parentFrame)
                        == JFileChooser.APPROVE_OPTION) {
                    tempDeck = jfc.getSelectedFile();
                    deckButton.setText(Utilities.getName(tempDeck));
                }
            }
        });
        message.add(deckButton, s);
        
        if(JOptionPane.showOptionDialog(parentFrame, message, Main.TITLE_MED,
                JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null,
                new String[] {"Apply", "Cancel"}, 0) == 0) {
            settings.put(NAME, nametf.getText());
            settings.put(DECK, tempDeck);
            save();
        }
    }