private void createComponent(Style style, String clazz) {
			componentStyles.add(style);
			clazz = clazz.intern();
			// legacy container names: the actual names have been renamed to org.concord.mw2d.ui.*
			if ("org.concord.mw2d.activity.AtomContainer" == clazz || "org.concord.mw2d.activity.GBContainer" == clazz
					|| "org.concord.mw2d.activity.ChemContainer" == clazz) {
				ModelCanvas mc = createModelCanvas(clazz);
				if (mc != null)
					StyleConstants.setComponent(style, mc);

			}
			else if (PageMd3d.class.getName() == clazz) {
				StyleConstants.setComponent(style, createMd3d());
			}
			else if (PageMolecularViewer.class.getName() == clazz) {
				StyleConstants.setComponent(style, createMolecularViewer());
			}
			else if (PageScriptConsole.class.getName() == clazz) {
				StyleConstants.setComponent(style, createScriptConsole());
			}
			else if (PageFeedbackArea.class.getName() == clazz) {
				StyleConstants.setComponent(style, createFeedbackArea());
			}
			else if (AudioPlayer.class.getName() == clazz) {
				StyleConstants.setComponent(style, createAudioPlayer());
			}
			else if (PageApplet.class.getName() == clazz) {
				StyleConstants.setComponent(style, createApplet());
			}
			else if (PageJContainer.class.getName() == clazz) {
				StyleConstants.setComponent(style, createPlugin());
			}
			else if (ActivityButton.class.getName() == clazz) {
				StyleConstants.setComponent(style, createActivityButton());
			}
			else if (PageButton.class.getName() == clazz) {
				StyleConstants.setComponent(style, createButton());
			}
			else if (PageComboBox.class.getName() == clazz) {
				StyleConstants.setComponent(style, createComboBox());
			}
			else if (PageRadioButton.class.getName() == clazz) {
				StyleConstants.setComponent(style, createRadioButton());
			}
			else if (PageCheckBox.class.getName() == clazz) {
				StyleConstants.setComponent(style, createCheckBox());
			}
			else if (PageSlider.class.getName() == clazz) {
				StyleConstants.setComponent(style, createSlider());
			}
			else if (PageSpinner.class.getName() == clazz) {
				StyleConstants.setComponent(style, createSpinner());
			}
			else if (PageTable.class.getName() == clazz) {
				StyleConstants.setComponent(style, createTable());
			}
			else if (PageTextField.class.getName() == clazz) {
				StyleConstants.setComponent(style, createTextField());
			}
			else if (SearchTextField.class.getName() == clazz) {
				StyleConstants.setComponent(style, createSearchTextField());
			}
			else if (PageTextArea.class.getName() == clazz) {
				StyleConstants.setComponent(style, createTextArea());
			}
			else if (PageTextBox.class.getName() == clazz) {
				StyleConstants.setComponent(style, createTextBox());
			}
			else if (PageMultipleChoice.class.getName() == clazz) {
				StyleConstants.setComponent(style, createMultipleChoice());
			}
			else if (ImageQuestion.class.getName() == clazz) {
				StyleConstants.setComponent(style, createImageQuestion());
			}
			else if (PageNumericBox.class.getName() == clazz) {
				StyleConstants.setComponent(style, createNumericBox());
			}
			else if (PageBarGraph.class.getName() == clazz) {
				StyleConstants.setComponent(style, createBarGraph());
			}
			else if (PageGauge.class.getName() == clazz) {
				StyleConstants.setComponent(style, createGauge());
			}
			else if (PageXYGraph.class.getName() == clazz) {
				StyleConstants.setComponent(style, createXYGraph());
			}
			else if (PagePotentialWell.class.getName() == clazz) {
				StyleConstants.setComponent(style, createPotentialWell());
			}
			else if (PagePotentialHill.class.getName() == clazz) {
				StyleConstants.setComponent(style, createPotentialHill());
			}
			else if (PageDNAScroller.class.getName() == clazz) {
				StyleConstants.setComponent(style, createDNAScroller());
			}
			else if (PageElectronicStructureViewer.class.getName() == clazz) {
				StyleConstants.setComponent(style, createElectronicStructureViewer());
			}
			else if (PageDiffractionInstrument.class.getName() == clazz) {
				StyleConstants.setComponent(style, createDiffractionInstrument());
			}
			else if (PagePhotonSpectrometer.class.getName() == clazz) {
				StyleConstants.setComponent(style, createPhotonSpectrometer());
			}
			else if (PagePeriodicTable.class.getName() == clazz) {
				StyleConstants.setComponent(style, createPeriodicTable());
			}
			else if (PageFunctionGraph.class.getName() == clazz) {
				StyleConstants.setComponent(style, createFunctionGraph());
			}
			else { // use reflection to construct unknown component
				try {
					Class<?> c = Class.forName(clazz);
					Object instance = c.newInstance();
					try {
						Method method = c.getMethod("init", (Class[]) null);
						if (method != null)
							method.invoke(instance, (Object[]) null);
					}
					catch (NoSuchMethodException e) {
					}
					if (instance instanceof Component)
						StyleConstants.setComponent(style, (Component) instance);
				}
				catch (Exception e) {
					e.printStackTrace();
				}
			}
		}