SocketClient frame =
new SocketClient();
frame.setTitle("Client Program");
WindowListener l = new WindowAdapter() {
publicvoid windowClosing(WindowEvent e) {
System.exit(0);
}
};
frame.addWindowListener(l);
frame.pack();
frame.setVisible(true);
frame.listenSocket();
Can u understand me whole program........