buf.append(service.getServer()); buf.append(':'); buf.append(service.getPort()); buf.append('\n');
    public void valueChanged(ListSelectionEvent e)    {	if (!e.getValueIsAdjusting()) {	    if (e.getSource() == typeList) {		type = (String)typeList.getSelectedValue();		jmdns.removeServiceListener(this);		services.setSize(0);		info.setText("");		jmdns.addServiceListener(type, this);	    } else if (e.getSource() == serviceList) {		String name = (String)serviceList.getSelectedValue();		if (name == null) {		    info.setText("");		} else {		    if (!name.endsWith(".")) {			name = name + "." + type;		    }		    ServiceInfo service = jmdns.getServiceInfo(type, name);		    if (service == null) {			info.setText("service not found");		    } else {			StringBuffer buf = new StringBuffer();			buf.append(name);			buf.append('\n');			buf.append(service.getAddress());			buf.append(':');			buf.append(service.getPort());			buf.append('\n');			for (Enumeration names = service.getPropertyNames() ; names.hasMoreElements() ; ) {			    String prop = (String)names.nextElement();			    buf.append(prop);			    buf.append('=');			    buf.append(service.getPropertyString(prop));			    buf.append('\n');			}		    			info.setText(buf.toString());		    }		}	    }	}    }