public boolean Save() {
		String filename = m_fileTitle.getText();
		
		//Stop saving if no filename is given.
		if (filename.isEmpty()) {
			JOptionPane.showMessageDialog(null, 
				"No filename");
			return false;
		}
		
		int width;
		int height;
		String str_width = m_chartWidth.getText().toString();
		String str_height = m_chartHeight.getText().toString();
		try {
			width = Integer.valueOf(str_width);
			height = Integer.valueOf(str_height);
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null, 
				"Width and Height entered not numbers");
			return false;
		}
		       
		try {
			
			BufferedImage bi = new BufferedImage(width, 
           		height, BufferedImage.TYPE_INT_ARGB);       
			Graphics g = bi.createGraphics();
			m_ChartPanel.paint(g);  //this == JComponent
			g.dispose();
			
			ImageIO.write(bi,"png",new File(filename + ".png"));
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null, 
				"Save unsuccessful");
			return false;
		}
	
		JOptionPane.showMessageDialog(null, "Save successful");
		m_Frame.setVisible(false);
		return true;
	}