launch(client.getFrame());
client.initializeListeners(); launch(client.getFrame());
    public void loadGame() {        FileDialog fd =            new FileDialog(frame, "Select saved game...", FileDialog.LOAD);        fd.setDirectory(".");        // limit file-list to savedgames only        fd.setFilenameFilter( new FilenameFilter() {                public boolean accept( File dir, String name ) {                    return ( null != name && name.endsWith( ".sav" ) );                }            } );        //Using the FilenameFilter class would be the appropriate way to        // filter for certain extensions, but it's broken under windoze.  See        // http://developer.java.sun.com/developer/bugParade/bugs/4031440.html        // for details.  The hack below is better than nothing.        fd.setFile("*.sav");                fd.show();        if (fd.getFile() == null) {            return;        }        HostDialog hd = new HostDialog(frame);        hd.show();        if (hd.name == null || hd.serverPass == null || hd.port == 0) {            return;        }        // Players should have to enter a non-blank, non-whitespace name.        boolean foundValid = false;        char[] nameChars = hd.name.toCharArray();        for ( int loop = 0; !foundValid && loop < nameChars.length; loop++ ) {            if ( !Character.isWhitespace( nameChars[loop] ) ) {                foundValid = true;            }        }        if ( !foundValid ) {            new AlertDialog( frame, "Load a Game",                             "Error: enter a player name." ).show();            return;        }        // kick off a RNG check        megamek.common.Compute.d6();        // start server        server = new Server(hd.serverPass, hd.port);        if (!server.loadGame(new File(fd.getDirectory(), fd.getFile()))) {            new AlertDialog(frame, "Load a Game", "Error: unable to load game file.").show();            server = null;            return;        }        client = new Client(hd.name, "localhost", hd.port);		launch(client.getFrame());        optdlg = null;    }