@Override
	public void actionPerformed(ActionEvent e) {

		// if (e.getSource() == this.view.getCreateGameButton()) {
		// LOGGER.log(Level.INFO, "Creating game.");
		// this.client.getServerHandler().sendCommand(
		// ServerProtocol.CREATE_GAME, new String[0]);
		// } else
		if (e.getSource() == this.view.getPrivateButton()) {
			User user = this.view.selectedPlayer;
			this.view.addTab(user);
			this.view.getPrivateButton().setEnabled(false);
		}
		if (e.getSource() == this.view.getTransferButton()) {
	        //Create and set up the window.
	        frame = new JFrame("FileChooserDemo");
	        frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
	 
	        //Add content to the window.
	        frame.add(new FileChoose(this, client));
	 
	        //Display the window.
	        frame.pack();
	        frame.setSize(300, 200);
			frame.setLocationRelativeTo(null);
			frame.setResizable(false);
	        frame.setVisible(true);
	        
		}
		// } else if (this.view.getJoinGameButton().getText().toLowerCase()
		// .equals(LobbyUI.BTN_START_GAME.toLowerCase())) {
		// // Start game if owner.
		// if (this.client.clientInfo.ownsGame) {
		// LOGGER.log(Logger.INFO, "Starting game.");
		// // TODO show GameUI
		// this.client.getServerHandler().sendCommand(
		// ServerProtocol.START_GAME, new String[0]);
		// }
		// }
		// } else if (e.getSource() == this.view.getJoinGamePCButton()) {
		// // Join game of selected user.
		// String creator = this.view.selectedPlayer;
		// LOGGER.log(Level.INFO, "Joining game by player " + creator + ".");
		// this.client.getServerHandler().sendCommand(
		// ServerProtocol.JOIN_GAME, new String[] { creator });
		// this.client.clientInfo.joiningGame = creator;l
		// this.client.clientInfo.joinAsComputer = true;
		// } else
		if (view.tabs.getSelectedComponent().getClass().equals(gui.PaneTab.class)) {
			PaneTab selectedTab = (PaneTab) this.view.tabs.getSelectedComponent();
			if (e.getSource() == selectedTab.getSendButton()) {
				sendMessage(selectedTab);
			}
		}
	}