e1.printStackTrace(); } catch (UnknownHostException e1) { e1.printStackTrace(); } }
    public Gui() {        initComponents();        try {            client = new XmlRpcClientLite(InetAddress.getByName(Utils.COREHOST)                    .getHostName(), Utils.COREPORT);            //XmlRpc.setDebug(true);            server = new WebServer(Utils.GUIPORT, InetAddress.getByName(Utils.GUIHOST));            GuiStub guiStub = new GuiStub(this);            server.start();            server.addHandler("gui", guiStub);            // call REGISTER_GUI immediately after GUI has been opened            params.clear();            params.addElement(Utils.GUIHOST);            params.addElement(new Integer(Utils.GUIPORT));            Object o = execute("core.registerGui", params, 0);            if (o == null) {                // --- something            } else if (((String) o).equalsIgnoreCase("OK")) {                print("GUI registered.");                params.clear();                o = execute("core.accountGetAll", params);                int a = 0;                if (o != null && o instanceof Vector) {                    Vector v = (Vector) o;                    Enumeration e = v.elements();                    while (e.hasMoreElements()) {                        Integer n = (Integer) e.nextElement();                        list1.addElement("#" + n.toString()                                + ": not registered");                        accounts.add(n);                        a++;                    }                    print("Got " + a + " accounts.");                }            } else {                print("ERROR: GUI not registered.");            }        } catch (MalformedURLException e1) {            e1.printStackTrace();        } catch (UnknownHostException e1) {            e1.printStackTrace();        }    }