private void buttonPlayPressed() {
		// figure out input and check for bad input
		String[] ipurlAndPort = ((String) cbIPURLPort.getSelectedItem()).split(":", -1);

		if (ipurlAndPort.length != 2) {
			ShowErrorMessage("Bad IP/URL:Port format", "IP/URL:Port format must be <IP/URL>:<Port>");
			return;
		}

		String nickname = ((String) cbNickname.getSelectedItem()).trim();
		String ipurl = ipurlAndPort[0].trim();
		String port = ipurlAndPort[1].trim();

		if (nickname.length() == 0) {
			ShowErrorMessage("Bad Nickname", "Nickname must have at least one visible charater in it");
			return;
		}

		if (ipurl.length() == 0) {
			ShowErrorMessage("Bad IP/URL", "The IP/URL must have at least one visible charater in it");
			return;
		}

		if (port.length() == 0) {
			ShowErrorMessage("Bad Port", "Port must have at least one visible charater in it");
			return;
		}

		Matcher matcher = badNicknameChars.matcher(nickname);
		if (matcher.find()) {
			ShowErrorMessage("Bad Nickname", "Nickname cannot contain a comma, semi-colon, colon, or double-quote");
			return;
		}

		Integer portInt;
		try {
			portInt = Integer.decode(port);
		} catch (NumberFormatException e) {
			Util.printStackTrace(e);
			portInt = 0;
		}
		if (portInt < 1 || portInt > 65535) {
			ShowErrorMessage("Bad Port", "Port must be a positive integer between 1 and 65535");
			return;
		}

		// tell UserPreferences about the changes
		ArrayList<String> nicknames = Main.getUserPreferences().getStringArrayList(UserPreferences.NICKNAMES);
		nicknames.remove(nickname);
		nicknames.add(0, nickname);

		ArrayList<String> addressesAndPorts = Main.getUserPreferences().getStringArrayList(UserPreferences.ADDRESSES_AND_PORTS);
		String addressAndPort = ipurl + ":" + portInt;
		addressesAndPorts.remove(addressAndPort);
		addressesAndPorts.add(0, addressAndPort);

		// input accepted, so leave this dialog
		Main.getMain().setPlayModeInfo(nickname, ipurl, portInt);
		hideGameDialog();
	}