void connectToServerActionPerformed(ActionEvent e) {
    boolean allOk = true;

    client.setHost(serverName.getText());
    addHistoryItem(oldServers, "serverNameHistory.txt", serverName.getText());

    if (!(client.loadGame(theGameClass.getText()))) {
      allOk = false;
    } else {
      client.setProtocolName(theGameClass.getText());
      printOutput("Protokoll " + theGameClass.getText() + " geladen !");
      addHistoryItem(oldGames, "protocolHistory.txt", theGameClass.getText());
    }

    try {
      client.setPort(Integer.parseInt(portNumber.getText()));

      if ((Integer.parseInt(portNumber.getText()) < 1024) || (Integer.parseInt(portNumber.getText()) > 9999)) {
        allOk = false;
        printOutput("Keine gueltige Port Nummer!");
      }
    } catch (java.lang.NumberFormatException ex) {
      System.err.print("Error:" + ex);
      client.log("Error:" + ex + "\n invalid PortNumber");
      printOutput("Keine gueltige Port Nummer!");
      allOk = false;
    } // catch

    if (allOk) {
      Thread t = new Thread(this);
      t.start();
    }

  }