Source of TicTacToeClientTest.java


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