frame.dispose();
    public void die() {        connected = false;        pump = null;                // shut down threads & sockets        try {            socket.close();            in.close();            out.close();        } catch (IOException e) {            e.printStackTrace();        } catch (NullPointerException e) {            // not a big deal, just never connected        }                frame.setVisible(false);        boolean disposed = false;        while ( !disposed ) {            try {                frame.dispose();                disposed = true;            }            catch ( Throwable error ) {                error.printStackTrace();                System.err.println( "Attempting to close the InputContext in java.client.Client#die()..." );                try {                    curPanel.getInputContext().endComposition();                }                catch ( Throwable thr ) {                    thr.printStackTrace();                }            }        }                System.out.println("client: died");    }