public void compose(Position singleNodePos){
		singleNodePosition = singleNodePos;
		JPanel cp = new JPanel();
		
		cp.setLayout(new BoxLayout(cp, BoxLayout.Y_AXIS));
		cp.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
		
		JPanel dist = new JPanel();
		dist.setBorder(BorderFactory.createTitledBorder("Node Distribution"));
		dist.setLayout(new BoxLayout(dist, BoxLayout.Y_AXIS));
		if(singleNodePos == null) {
			cp.add(dist);
		}
		JPanel distSel = new JPanel();
		distSel.setBorder(BorderFactory.createEmptyBorder(0,3,3,3));
		distSel.setLayout(new NonRegularGridLayout(2, 3, 5, 2));
		
		// Number of nodes
		// ----------------------------
		UnborderedJTextField numSelLabel = new UnborderedJTextField("Number of Nodes:", Font.BOLD);
		distSel.add(numSelLabel);
		distSel.add(number);
		JTextField dummy = new JTextField();
		dummy.setVisible(false);
		distSel.add(dummy);
		
		// the available distrubutions
		// ----------------------------
		UnborderedJTextField distSelLabel = new UnborderedJTextField("Distribution Model:", Font.BOLD);
		distSel.add(distSelLabel);
		fillChoice(distributionModelComboBox, "models/distributionModels", distributionSel);
		distSel.add(distributionModelComboBox);
		distributionParam.setText(distributionParamDefString);
		distSel.add(distributionParam);
		dist.add(distSel);		

		JPanel propertyPanel = new JPanel();
		propertyPanel.setBorder(BorderFactory.createTitledBorder("Node Properties"));
		propertyPanel.setLayout(new BoxLayout(propertyPanel, BoxLayout.Y_AXIS));
		cp.add(propertyPanel);
		JPanel props = new JPanel();
		props.setBorder(BorderFactory.createEmptyBorder(0,3,3,3));
		props.setLayout(new NonRegularGridLayout(5,3, 5, 2));
		propertyPanel.add(props);
		
		
		// the available node implementations
		// ----------------------------
		UnborderedJTextField propSelLabel = new UnborderedJTextField("Node Implementation:", Font.BOLD);
		props.add(propSelLabel);
		fillChoice(nodeTypeComboBox, "nodes/nodeImplementations", nodeTypeSel);
		props.add(nodeTypeComboBox);
		nodeTypeParam.setEditable(false);
		nodeTypeParam.setVisible(false);
		props.add(nodeTypeParam);

		//the available connectivities
		// ----------------------------
		UnborderedJTextField connSelLabel = new UnborderedJTextField("Connectivity Model:", Font.BOLD);
		props.add(connSelLabel);
		fillChoice(connectivityModelComboBox, "models/connectivityModels", connectivitySel);
		props.add(connectivityModelComboBox);
		connectivityParam.setText(connectivityDefString);
		props.add(connectivityParam);
		
		//the available interferences
		// ----------------------------
		UnborderedJTextField interSelLabel = new UnborderedJTextField("Interference Model:", Font.BOLD);
		props.add(interSelLabel);
		fillChoice(interferenceModelComboBox, "models/interferenceModels", interferenceSel);
		props.add(interferenceModelComboBox);	
		interferenceParam.setText(interferenceDefString);
		props.add(interferenceParam);
		
		//the available mobility
		// ----------------------------
		UnborderedJTextField mobSelLabel = new UnborderedJTextField("Mobility Model:", Font.BOLD);
		props.add(mobSelLabel);
		fillChoice(mobilityModelComboBox, "models/mobilityModels", mobilitySel);
		props.add(mobilityModelComboBox);
		mobilityParam.setText(mobilityDefString);
		props.add(mobilityParam);
		
		//the available reliability models
		// ----------------------------
		UnborderedJTextField reliSelLabel = new UnborderedJTextField("Reliability Model:", Font.BOLD);
		props.add(reliSelLabel);
		fillChoice(reliabilityModelComboBox, "models/reliabilityModels", reliabilitySel);
		props.add(reliabilityModelComboBox);
		reliabilityParam.setText(reliabilityDefString);
		props.add(reliabilityParam);
		

		// add a button to change whether all implementations are contained in the drop down fields
		JPanel allModelsPanel = new JPanel();
		allModelsPanel.setLayout(new BorderLayout());
		allModelsCheckBox = new JCheckBox("Show all implementations");
		allModelsCheckBox.setSelected(Configuration.showModelsOfAllProjects);
		allModelsCheckBox.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent e) {
				if(Configuration.showModelsOfAllProjects != allModelsCheckBox.isSelected()) {
					Configuration.showModelsOfAllProjects = allModelsCheckBox.isSelected();
					// reload the contents of the drop down fields
					fillChoice(distributionModelComboBox, "models/distributionModels", distributionSel);
					fillChoice(nodeTypeComboBox, "nodes/nodeImplementations", nodeTypeSel);			
					fillChoice(connectivityModelComboBox, "models/connectivityModels", connectivitySel);
					fillChoice(interferenceModelComboBox, "models/interferenceModels", interferenceSel);			
					fillChoice(mobilityModelComboBox, "models/mobilityModels", mobilitySel);			
					fillChoice(reliabilityModelComboBox, "models/reliabilityModels", reliabilitySel);		
					GenerateNodesDialog.this.pack();
				}
			}
		});
		allModelsPanel.add(allModelsCheckBox);
		cp.add(allModelsPanel);

		// the buttons OK / CANCEL
		JPanel buttons = new JPanel();
		ok.setMnemonic(java.awt.event.KeyEvent.VK_O);
		buttons.add(ok);		
		cancel.setMnemonic(java.awt.event.KeyEvent.VK_C);
		buttons.add(cancel);
		
		cp.add(buttons);
		
		this.setContentPane(cp);

		//this.setResizable(false);
		this.getRootPane().setDefaultButton(ok);
		this.pack();
		this.setLocationRelativeTo(parent);
		number.grabFocus();
		this.setVisible(true);
	}