import java.awt.*; import java.awt.event.*; import javax.swing.*; import net.jini.discovery.LookupDiscovery; /** * SmartCat.java * * * Created: Wed Feb 17 17:48:26 1999 * * @author Jan Newmarch * @version */ public class SmartCat extends JFrame { public SmartCat(String fileName) { super("Smart Cat"); setSize(600, 400); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {System.exit(0);} public void windowOpened(WindowEvent e) {}}); LookupDiscovery discover = null; try { discover = new LookupDiscovery(LookupDiscovery.ALL_GROUPS); } catch(Exception e) { System.out.println(e.toString()); } AdderListener adder = new AdderListener(this, fileName); discover.addDiscoveryListener(adder); getContentPane().setLayout(new BorderLayout()); } public static void main(String[] args) { SmartCat f = new SmartCat(args[0]); f.show(); } } // SmartCat