public void actionPerformed(ActionEvent actionEvent) {
		if (actionEvent.getSource() == btnStartGame) {
			if (txtNickname.getText().length() == 0) {
				messagesLabel.setText("Insert a nickname");
				return;
			} else {
				Constants.nickName = txtNickname.getText();
			}

			if (txtPort.getText().length() == 0) {
				messagesLabel.setText("Insert a port number");
				return;
			} else {
				try {
					Constants.portNumber = Integer.valueOf(txtPort.getText());
				} catch (Exception ex) {
					messagesLabel.setText("Insert a valid port number");
					return;
				}
			}

			if (txtRegistrarURL.getText().length() == 0) {
				messagesLabel.setText("Insert the registrar's URL");
				return;
			} else {
				Constants.registrarURL = txtRegistrarURL.getText();
			}

			messagesLabel.setText("");
			btnStartGame.setEnabled(false);
			Thread t = new Thread(new Runnable() {
				@Override
				public void run() {
					starter.initializeGame(Constants.nickName, Constants.portNumber, Constants.registrarURL, false);
				}
			});
			t.start();
		} else {
			System.exit(0);
		}
	}