import horb.orb.*; import javax.swing.*; import java.awt.event.*; import java.awt.*; public class Server { public static void main(String args[]) { if(args.length != 2){return;} else if(null==( new Integer(args[1]))){return;} HORBServer hs = new HORBServer(new Integer(args[1])); CommMessage com = new CommMessage(); CommMP com_mp = new CommMP(); ChatFrame fra = new ChatFrame(args); fra.setVisible(true); com.set(fra); com_mp.set(fra); HORBServer.registerObject("CommMessage",com,args[0]); HORBServer.registerObject("CommMP",com_mp,args[0]+"ref"); fra.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } }