protected void saveMap()
	{
		JFileChooser chooser = new JFileChooser(new File("."));
		chooser.setSelectedFile(new File("." + File.separator + nameTFD.getText() + ".bhMap"));
		FileNameExtensionFilter filter = new FileNameExtensionFilter("BomberHansMap", new String[] { "bhmap" });
		chooser.setFileFilter(filter);
		int returnVal = chooser.showSaveDialog(this);
		if(returnVal != 0)
		{
			return;
		}
		
		try
		{
			String fileName = chooser.getSelectedFile().getPath();
			if( !filter.accept(chooser.getSelectedFile()))
			{
				fileName = fileName + ".bhmap";
			}
			DataOutputStream out = new DataOutputStream(new FileOutputStream(fileName));
			
			out.writeByte(1);
			out.writeUTF(nameTFD.getText());
			out.writeByte(Byte.parseByte(woodStayTFD.getText()));
			out.writeByte(Byte.parseByte(specialTFD.getText()));
			out.writeByte(field.getSizeX());
			out.writeByte(field.getSizeY());
			
			for(byte x = 0; x < field.getSizeX(); x = (byte) (x + 1))
			{
				for(byte y = 0; y < field.getSizeY(); y = (byte) (y + 1))
				{
					out.write(field.getCellType(x, y));
				}
			}
			
			out.close();
		}
		catch(Exception e)
		{
			JOptionPane.showMessageDialog(this, e);
		}
	}