public boolean Dialogue(){
	boolean change=false;
//	ArrayList<String> force_names = new ArrayList<String>();
//	String[] force_names = {"Atomic","InverseCube","InverseSquare", "Inverse","InverseSquareRoot","SquareRoot","Sin","Constant","Log","DirectlyProportional","Squared","Cubed","Power4","Quadratic"};
	String[] force_names = {
						"InverseCube",
						"InverseSquare", 
						"Inverse",
						"InverseSquareRoot",
						"SquareRoot",
						"Sin",
						"Constant",
						"Log",
						"DirectlyProportional",
						"Squared",
						"Cubed",
						"Power4",
						"Quadratic"
						};

    /*
	try {
	  Class forces[]=getClasses("force");
	  for (Class c : forces){
		  force_names.add(c.getName());
	  }	  
	} catch (IOException e) {
		;
		//something freaked out reading classes
	} catch (ClassNotFoundException e) {
		;//something freaked out reading package
	}
	*/
	
		JComboBox force_names_field = new JComboBox(force_names);
    	force_names_field.setSelectedItem(forceName);
    	JTextField forceOffset_field = new JTextField(Double.toString(this.forceOffset));
    	JTextField numberOfPlanets_field = new JTextField(Integer.toString(this.numberOfPlanets));
    	JTextField averageEnergy_field = new JTextField(Double.toString(this.averageEnergy));
    	JTextField sun_size_field = new JTextField(Double.toString(this.sun_size));
    	JCheckBox centrifugal_flag_field = new JCheckBox("Centrifugal");
    	centrifugal_flag_field.setSelected(this.centrifugal_flag);
    	JCheckBox sun_flag_field = new JCheckBox("Sun");
    	sun_flag_field.setSelected(this.sun_flag);
    	JCheckBox random_radii_flag_field = new JCheckBox("Random Radii");
    	random_radii_flag_field.setSelected(this.random_radii_flag);
    	JCheckBox random_position_flag_field = new JCheckBox("Random Position");
    	random_position_flag_field.setSelected(this.random_position_flag);
    	JCheckBox random_colour_flag_field = new JCheckBox("Random Colour");
    	random_colour_flag_field.setSelected(this.random_colour_flag);

		JPanel panel = new JPanel(new GridLayout(0, 1));
		panel.add(new JLabel("Gravity Type (select your own gravity)"));
		panel.add(force_names_field);
		panel.add(new JLabel("Force offset"));
		panel.add(forceOffset_field);		
		panel.add(new JLabel("Number of Planets"));
		panel.add(numberOfPlanets_field);
		panel.add(new JLabel("Average Energy (increase to go faster)"));
		panel.add(averageEnergy_field);
		panel.add(centrifugal_flag_field);
		panel.add(sun_flag_field);
		panel.add(new JLabel("Sun Size (increase to stablise solar system"));
		panel.add(sun_size_field);
		panel.add(random_radii_flag_field);
		panel.add(random_position_flag_field);
		panel.add(random_colour_flag_field);
		
		int result = JOptionPane.showConfirmDialog(this, panel, "Solar System Configuration",
					        JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
		if (result == JOptionPane.OK_OPTION) {
			numberOfPlanets = Integer.parseInt(numberOfPlanets_field.getText());
			forceOffset = Double.parseDouble(forceOffset_field.getText());
			averageEnergy = Double.parseDouble(averageEnergy_field.getText());
			forceName=force_names_field.getSelectedItem().toString();
			centrifugal_flag=centrifugal_flag_field.isSelected();
			sun_flag=sun_flag_field.isSelected();
			sun_size = Double.parseDouble(sun_size_field.getText());
			random_radii_flag=random_radii_flag_field.isSelected();
			random_position_flag=random_position_flag_field.isSelected();
			random_colour_flag=random_colour_flag_field.isSelected();

			change=true;
		}
		return change;
   }