/** * {@inheritDoc} * * <p>Broadcasts on this channel the text entered by the user. */ public void actionPerformed(ActionEvent action) { try { byte[] contents = inputField.getText().getBytes(); byte[] message = ChatClient.getMessage(OP_MESSAGE, contents); myChannel.send(message); } catch (IOException e) { e.printStackTrace(); } inputField.setText(""); }