public class ClientTest
1: // Fig. 24.8: ClientTest.java
2: // Test the Client class.
3: import javax.swing.JFrame;
4:
5: public class ClientTest
6: {
7: public static void main( String args[] )
8: {
9: Client application; // declare client application
10:
11: // if no command line args
12: if ( args.length == 0 )
13: application = new Client( "127.0.0.1" ); // connect to localhost
14: else
15: application = new Client( args[ 0 ] ); // use args to connect
16:
17: application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
18: application.runClient(); // run client application
19: } // end main
20: } // end class ClientTest
21:
22: /**************************************************************************
23: * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
24: * Pearson Education, Inc. All Rights Reserved. *
25: * *
26: * DISCLAIMER: The authors and publisher of this book have used their *
27: * best efforts in preparing the book. These efforts include the *
28: * development, research, and testing of the theories and programs *
29: * to determine their effectiveness. The authors and publisher make *
30: * no warranty of any kind, expressed or implied, with regard to these *
31: * programs or to the documentation contained in these books. The authors *
32: * and publisher shall not be liable in any event for incidental or *
33: * consequential damages in connection with, or arising out of, the *
34: * furnishing, performance, or use of these programs. *
35: *************************************************************************/