private void setSettingsPanel() {
		if (square) {
			playersNumber = new JComboBox<String>(new String[]{"1 Player", "2 Players", "3 Players", "4 Players"});
		} else {
			playersNumber = new JComboBox<String>(new String[]{"1 Player", "2 Players", "3 Players", "4 Players", "5 Players", "6 Players"});
		}
		playersNumber.setFocusable(false);
		playersNumber.addItemListener(new ItemListener() {

			public void itemStateChanged(ItemEvent e) {
				for (int i = 1; i < playersTypes.size(); i++){
					playersTypes.get(i).setEnabled(i < playersNumber.getSelectedIndex() + 1);
				}
			}
			
		});
		
		boardSize = new JComboBox<String>(new String[]{"7 x 7", "9 x 9", "11 x 11", "13 x 13", "15 x 15"});
		boardSize.setFocusable(false);
		
		numberOfOpenings = new JComboBox<String>(new String[]{"1 Opening", "2 Openings", "3 Openings", "4 Openings"});
		numberOfOpenings.setFocusable(false);
		
		tileShape = new JComboBox<String>(new String[]{"Hexagon", "Square"});
		tileShape.setSelectedIndex((square)? 1 : 0);
		tileShape.setFocusable(false);
		tileShape.addItemListener(new ItemListener() {

			public void itemStateChanged(ItemEvent e) {
				if (isVisible()) {
					setVisible(false);
					square = tileShape.getSelectedIndex() == 1;
					mainPanel.remove(settingsPanel);
					setSettingsPanel();
					mainPanel.add(settingsPanel);
					pack();
					setLocationRelativeTo(null);
					setVisible(true);
				}
			}
			
		});
		
		JPanel p1 = new JPanel(new GridLayout(4, 2, 5, 5));
		p1.setOpaque(false);
		p1.add(new JLabel("Shape"));
		p1.add(tileShape);
		p1.add(new JLabel("Size"));
		p1.add(boardSize);
		p1.add(new JLabel("Openings"));
		p1.add(numberOfOpenings);
		p1.add(new JLabel("Players"));
		p1.add(playersNumber);
		
		int r = (square)? 4 : 6;
		
		JPanel p2 = new JPanel(new GridLayout(r, 2, 5, 5));
		p2.setOpaque(false);
		
		JLabel[] labels = new JLabel[r];
		playersTypes = new ArrayList<JComboBox<String>>();
		for (int i = 0; i < labels.length; i++) {
			labels[i] = new JLabel("Player " + (i + 1));
			labels[i].setForeground(PlayPanel.getColor(i));
			JComboBox<String> playerType = new JComboBox<String>(new String[]{"Human"});
			if (i != 0) {
				playerType.addItem("Computer");
				playerType.setEnabled(false);
			}
			playerType.setFocusable(false);
			p2.add(labels[i]);
			p2.add(playerType);
			playersTypes.add(playerType);
		}
		
		JPanel p3 = new JPanel();
		p3.setOpaque(false);
		p3.add(p1);
		p3.add(Box.createRigidArea(new Dimension(30, 0)));
		p3.add(p2);
		
		settingsPanel = new JPanel();
		settingsPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
		settingsPanel.setOpaque(false);
		settingsPanel.add(p3);
	}