public void savePreset(String presetName)
			{
				SimulationWindow sim = Hub.simWindow;
				BufferedWriter out = null;

				try
					{
						File presetFile = new File(saveDirectory + "//" + presetName + ".txt");

						while (presetFile.exists())
							{
								presetName = new String(presetName + "-");
								presetFile = new File(saveDirectory + "//" + presetName + ".txt");
							}

						out = new BufferedWriter(new FileWriter(presetFile, false));
						out.write("Plants:");
						out.newLine();
						out.write("LeafSize= " + sim.leafSizeSlider.getValue());
						out.newLine();
						out.write("StalkLength= " + sim.stalkLengthSlider.getValue());
						out.newLine();
						out.write("MutationChance= " + sim.mutantOffspringSlider.getValue());
						out.newLine();
						out.write("DNADamage= " + sim.dnaDamageSlider.getValue());
						out.newLine();
						out.newLine();
						out.write("Light:");
						out.newLine();
						out.write("RedLightIntensity= " + sim.redLightSlider.getValue());
						out.newLine();
						out.write("GreenLightIntensity= " + sim.greenLightSlider.getValue());
						out.newLine();
						out.write("BlueLightIntensity= " + sim.blueLightSlider.getValue());
						out.newLine();
						out.write("LeafTransparency= " + sim.leafOpacitySlider.getValue());
					}
				catch (Exception e)
					{
						e.printStackTrace();
					}
				finally
					{
						try
							{
								out.flush();
								out.close();
							}
						catch (IOException e)
							{
								e.printStackTrace();
							}
					}
			}