launch(client.getFrame());
client.initializeListeners(); launch(client.getFrame());
    public void connect() {        ConnectDialog cd;        cd = new ConnectDialog(frame);        cd.show();        // verify dialog data        if(cd.name == null || cd.serverAddr == null || cd.port == 0) {            return;        }        // Players should have to enter a non-blank, non-whitespace name.        boolean foundValid = false;        char[] nameChars = cd.name.toCharArray();        for ( int loop = 0; !foundValid && loop < nameChars.length; loop++ ) {            if ( !Character.isWhitespace( nameChars[loop] ) ) {                foundValid = true;            }        }        if ( !foundValid ) {            new AlertDialog( frame, "Connect to Game",                             "Error: enter a player name." ).show();            return;        }        // initialize game        client = new Client(cd.name, cd.serverAddr, cd.port);		launch(client.getFrame());    }