sb.append("<p>"); Util.startFont(sb, "-2"); sb.append("No CM metatype found in bundle.<br>"); sb.append("<p>See <a href=\"http: sb.append("<p>The "); Util.bundleLink(sb, Activator.bc.getBundle(0)); sb.append(" shows all available configurations</p>"); sb.append("</font>"); sb.append("</p>");   sb.append("</html>\n");  jhtml.setHTML(sb.toString());  main.add(jhtml, BorderLayout.CENTER);
JHTML jhtml = new JHTML(sb.toString());  main.add(jhtml, BorderLayout.CENTER);  } catch (Exception e) { e.printStackTrace(); }
  void setProvider(MetaTypeProvider _mtp, PIDProvider _pp,		   Bundle bundle) {    this.mtp = _mtp;    this.pp  = _pp;    main.removeAll();    if(mtp != null) {            servicePIDBox = null;      factoryPIDBox = null;            String[] servicePIDs = pp.getPids();      if(servicePIDs != null && servicePIDs.length > 0) {	servicePIDBox = new JComboBox(servicePIDs);	servicePIDBox.addActionListener(new ActionListener() {	  	    public void actionPerformed(ActionEvent ev) {	    	      int ix = servicePIDBox.getSelectedIndex();	      if(ix == -1) {		return;	      } else {		String pid = (String)servicePIDBox.getSelectedItem();		setServiceOCD(pid);	      }	    }	  });      }            String[] factoryPIDs = pp.getFactoryPids();      if(factoryPIDs != null && factoryPIDs.length > 0) {	factoryPIDBox = new JComboBox(factoryPIDs);	factoryPIDBox.addActionListener(new ActionListener() {	  	    public void actionPerformed(ActionEvent ev) {	    	      int ix = factoryPIDBox.getSelectedIndex();	      if(ix == -1) {		return;	      } else {		String pid = (String)factoryPIDBox.getSelectedItem();		setFactoryOCD(pid);	      }	    }	  });      }            JPanel upperBox = new JPanel(new GridLayout(0, 1));            String title = "Available PIDs";      if(mtp instanceof MTP) {	title = title + " in " + ((MTP)mtp).getId();      }      upperBox.setBorder(makeBorder(this, title));            if(servicePIDBox != null) {	upperBox.add(new JLabelled("Services", 				   "PIDs representing ManagedServices",				   servicePIDBox, 100));      }      if(factoryPIDBox != null) {	upperBox.add(new JLabelled("Factories", 				   "PIDs representing ManagedServiceFactories",				   factoryPIDBox, 100));      }            main.add(upperBox,   BorderLayout.NORTH);      main.add(jcmService, BorderLayout.CENTER);      // Set either the first service or the first factory as displayed      if(servicePIDs != null && servicePIDs.length > 0) {	setServiceOCD(servicePIDs[0]);      } else {	if(factoryPIDs != null && factoryPIDs.length > 0) {	  setFactoryOCD(factoryPIDs[0]);	} else {	  // Neither service nor factory found in provider	}      }    } else {      JHTML jhtml = new JHTML();      StringBuffer sb = new StringBuffer();      sb.append("<html>");      sb.append("<table border=0 width=\"100%\">\n");      sb.append("<tr><td width=\"100%\" bgcolor=\"#eeeeee\">");      Util.startFont(sb, "-1");      sb.append(getBundleSelectedHeader(bundle));      sb.append("</font>\n");      sb.append("</td>\n");      sb.append("</tr>\n");      sb.append("</table>\n");      sb.append("<p>");      Util.startFont(sb, "-2");      sb.append("No CM metatype found in bundle.<br>");      sb.append("<p>See <a href=\"http://www.knopflerfish.org/XMLMetatype/\">http://www.knopflerfish.org/XMLMetatype/</a> for details on how to add metatype and default values.</p>");      sb.append("<p>The ");      Util.bundleLink(sb, Activator.bc.getBundle(0));      sb.append(" shows all available configurations</p>");      sb.append("</font>");      sb.append("</p>");                  sb.append("</html>\n");            jhtml.setHTML(sb.toString());            main.add(jhtml, BorderLayout.CENTER);    }    invalidate();    revalidate();    repaint();  }