private void selectPlayerCount(int numPlayers) {
		playerNames = new JTextField[numPlayers];
		playerType = new JCheckBox[numPlayers];
		namePnl.removeAll();
		if (checkBoxListener == null) {
			checkBoxListener = new ActionListener() {
				public void actionPerformed(ActionEvent event) {
					if (event.getSource() instanceof JCheckBox) {
						JCheckBox checkBox = (JCheckBox) event.getSource();
						checkFieldHash.get(checkBox).setEnabled(!checkBox.isSelected());
					}
				}
			};
		}
		checkFieldHash.clear();
		for (int i = 0; i < numPlayers; i++) {
			JPanel pnl = new JPanel();
			playerNames[i] = new JTextField("Player " + (i + 1), 15);
			playerType[i] = new JCheckBox();
			playerType[i].addActionListener(checkBoxListener);
			checkFieldHash.put(playerType[i], playerNames[i]);
			pnl.add(playerNames[i]);
			pnl.add(new JLabel("AI:"));
			pnl.add(playerType[i]);
			namePnl.add(pnl);
		}
		pack();
		if (namePnl.getParent().getHeight() > 400)
			namePnl.getParent().setPreferredSize(new Dimension(225, 400));
		namePnl.revalidate();
	}