void connectionFailed() {
   login.setEnabled(true);
   logout.setEnabled(false);
   // whoIsIn.setEnabled(false);
   chatStatus.setText("Please login first");
   chatField.setText("");
   // reset port number and host name as a construction time
   tfPort.setText("" + defaultPort);
   tfServer.setText(defaultHost);
   // let the user change them
   tfServer.setEditable(false);
   tfPort.setEditable(false);
   // don't react to a <CR> after the username
   chatField.removeActionListener(this);
   connected = false;
 }