public void buildFrame() {
		this.addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				try {
					SPClient spClient = client;
					client.getChatroom().logout(spClient);
				} catch (RemoteException e1) {
					e1.printStackTrace();
				}
			}
		});

		mainPanel = new JPanel(new BorderLayout());

		usersModel = new DefaultListModel();
		usersJList = new JList(usersModel);
		usersJList.setPreferredSize(new Dimension(140, 400));
		usersJList.setMinimumSize(new Dimension(140, 400));
		usersJList.addMouseListener(new MouseListener() {
			public void mouseClicked(MouseEvent event) {
				if (event.getClickCount() == 2) {
					try {
						String name = client.getName();
						String target = (String) usersJList.getSelectedValue();
						if (!target.equals(name)) {
							int find = findOpenedTab(target);
							if (find == -1) {
								SPClient c = client.getChatroom().getClient(
								          (String) usersJList.getSelectedValue());
								createTab(c);
							} else {
								messageTabbedPane.setSelectedIndex(find);
							}
						}
					} catch (RemoteException e) {
						System.err.println(e);
					}
				}
			}

			public void mouseReleased(MouseEvent event) {
			}

			public void mousePressed(MouseEvent event) {
			}

			public void mouseExited(MouseEvent event) {
			}

			public void mouseEntered(MouseEvent event) {
			}
		});
		usersPane = new JScrollPane(usersJList);

		// Création du panneau onglets et création de l'onglet chatroom
		tabs = new ArrayList<ITab>();
		messageTabbedPane = new JTabbedPane();

		horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, messageTabbedPane,
		          usersPane);
		horizontalSplitPane.setDividerLocation(600);
		horizontalSplitPane.setEnabled(false);
		inputPanel = new JPanel();
		inputPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
		inputArea = new JTextArea(6, 60);
		inputPanel.add(inputArea);
		sendButton = new JButton("Send");
		inputPanel.add(sendButton);

		sendButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				sendMessage();
			}
		});

		InputMap input = inputArea.getInputMap();
		KeyStroke enter = KeyStroke.getKeyStroke("ENTER");
		KeyStroke shiftEnter = KeyStroke.getKeyStroke("shift ENTER");
		input.put(shiftEnter, INSERT_BREAK);
		input.put(enter, TEXT_SUBMIT);

		ActionMap actions = inputArea.getActionMap();
		actions.put(TEXT_SUBMIT, new AbstractAction() {
			private static final long serialVersionUID = 1L;

			@Override
			public void actionPerformed(ActionEvent e) {
				sendMessage();
			}
		});

		verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, horizontalSplitPane,
		          inputPanel);
		verticalSplitPane.setDividerLocation(450);
		verticalSplitPane.setEnabled(false);

		mainPanel.add(verticalSplitPane);

		this.setMinimumSize(new Dimension(800, 600));
		this.setSize(800, 600);
		this.setResizable(false);
		this.setLocationRelativeTo(null);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		try {
			this.setTitle("ChatRoom - " + client.getName());
		} catch (RemoteException e1) {
			e1.printStackTrace();
		}
		this.setContentPane(mainPanel);
		this.setVisible(false);
	}