TalkServerSearch.java



/** TalkServerを探索するクラス */
import java.awt.*;
import java.net.*;
import java.rmi.*;
public class TalkServerSearch {

  /** コンストラクタ */
    public TalkServerSearch () {
        try {
            TalkServerList list = new TalkServerList();
            AccessButton button = new AccessButton( list );

            Frame frame = new Frame( "Server Lists" );
            frame.add( list.panel, "Center" );
            frame.add( button, "South" );
            frame.pack();
            frame.show();
         }
         catch( Exception e ) {
            System.out.println( "Error:" + e.toString() );
            System.exit(-1);
         }
    }

  /** 起動時に呼び出されるメソッド */
    public static void main( String argv[] ) {

        System.setSecurityManager( new RMISecurityManager() );
        try {
            TalkServerSearch search = new TalkServerSearch();
         }
         catch( Exception e ) {
            System.out.println( "Error:" + e.toString() );
            System.exit(-1);
         }
    }
}