휴지통/Java

Client Test

LeReve 2013. 3. 11. 12:34

import javax.swing.JFrame;


public class ClientTest {
 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  Client application; // 클라이언트 애플리케이션을 선언함
  
  // 만약 명령줄 인자가 없다면
  if(args.length == 0)
   application = new Client("127.0.0.1"); // localhost에 연결함
  else
   application = new Client(args[0]); // 입력받은 인자를 사용해서 연결함
  
  application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  application.runClient(); // 클라이언트 애플리케이션을 실행함
 } // main 메소드 끝
} // ClientTest 클래스 끝