public ConversationPanel(String panelIdentifier) {
    this.identifier = panelIdentifier;

    GridBagLayout layout = new GridBagLayout();
    GridBagConstraints layoutConstraints = new GridBagConstraints();
    this.setLayout(layout);

    layoutConstraints.insets = new Insets(5, 5, 5, 5);

    conversationDisplayArea = new JTextPane();
    conversationDisplayArea.setContentType("text/html");
    conversationDisplayArea.setBorder(BorderFactory.createLineBorder(Color.GRAY));
    conversationDisplayArea.setEditable(false);
    layoutConstraints.gridwidth = 2;
    layoutConstraints.weightx = 1;
    layoutConstraints.weighty = 1;
    layoutConstraints.gridx = 0;
    layoutConstraints.gridy = 0;
    layoutConstraints.fill = GridBagConstraints.BOTH;
    JScrollPane conversationScroll = new JScrollPane(conversationDisplayArea);
    this.add(conversationScroll, layoutConstraints);

    inputArea = new JTextArea();
    inputArea.setRows(2);
    inputArea.setLineWrap(true);
    inputArea.setWrapStyleWord(true);
    inputArea.setBorder(BorderFactory.createLineBorder(Color.GRAY));
    inputArea.addKeyListener(new InputEnterKeyListener());
    layoutConstraints.gridwidth = 1;
    layoutConstraints.weightx = 1;
    layoutConstraints.weighty = 0;
    layoutConstraints.gridx = 0;
    layoutConstraints.gridy = 1;
    layoutConstraints.fill = GridBagConstraints.HORIZONTAL;
    JScrollPane inputScroll = new JScrollPane(inputArea);
    this.add(inputScroll, layoutConstraints);

    sendButton = new JButton("Send");
    sendButton.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent arg0) {
        String message = inputArea.getText();
        inputArea.setText("");
        if (!message.isEmpty()) {
          messageListener.messageFromUi(identifier, message);
          writeMessage(USER, message);
        }
      }
    });
    layoutConstraints.gridwidth = 1;
    layoutConstraints.weightx = 0;
    layoutConstraints.gridx = 1;
    layoutConstraints.gridy = 1;
    layoutConstraints.fill = GridBagConstraints.NONE;
    this.add(sendButton, layoutConstraints);

    this.setVisible(true);
    inputArea.requestFocusInWindow();

    dateFormat = new SimpleDateFormat("dd MMM yyyy HH:mm:ss");
  }