public void loadFileDialog()
	{
		JFileChooser fc = new JFileChooser();
		
		
		if(fc.showOpenDialog(mainFrame) != JFileChooser.CANCEL_OPTION)
		{
			try
			{
				GraphData data;
				data = (GraphData) ObjectSerializer.readFromFile(fc.getSelectedFile().getPath());
				
				if(data != null)
				{
					for(int i=0; i<functionFrames.size(); i++)
					{
						functionFrames.get(i).dispose();
					}
					
					graphData = data;
					
					for(int i=0; i<graphData.getNumberOfFunctions(); i++)
					{
						functionFrames.add(new FunctionFrame(this, graphData.getFunction(i)));
					}
					
					updateShownGraphData();
				}
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			catch (ClassNotFoundException e)
			{
				e.printStackTrace();
			}
		}
	}