private void makeConnection(){
		String serverIP = this.view.getServerField().getText();
		String portText = this.view.getPortField().getText();
		String nickname = this.view.getUsernameField().getText();
        String password = this.view.getPasswordField().getText();
		if (!serverIP.equals("") && !portText.equals("") && !nickname.equals("") && !password.equals("")) {
			try {
				int port = Integer.parseInt(portText);
				SAMPCA client = new SAMPCA(port, MainUI.LBL_DEF_First_IP_PART + serverIP, nickname, password);
				// Client client = new Client("luna", 5555, "Kurocon");
//				synchronized (client) {
//					try {
//						while (!client.isConnected && !client.finished) {
//							client.wait();
//						}
//					} catch (InterruptedException ie) {
//
//					}
//				}
				if (!client.finished) {
					this.view.getFrame().setVisible(false);
					//client.hello();
					//@SuppressWarnings("unused")
					// Is used to create a lobby view
					//LobbyUI lobby = new LobbyUI(client);
					//client.updateGUI();
				} else {
					new Popup("Connection failed");
				}
			} catch (NumberFormatException nfe) {
				new Popup("The port is not a number");
			}
		} else {
			new Popup("Invalid information");
		}
    }