public void load() {

		if(EM.getselectedButton()!=null) {
			EM.getselectedButton().setUnclickedButtonImage();
			EM.setselectedButton(null);
		}

		String input = null;
		JFileChooser fc = new JFileChooser();

		int returnVal = fc.showOpenDialog(null);
		if (returnVal == JFileChooser.APPROVE_OPTION) {
			File file = fc.getSelectedFile();
			input = file.getName();
		}

		if(input.contains("map")) {
			map = new MapElement();
			try
			{
				FileInputStream fileIn =
						new FileInputStream(input);
				ObjectInputStream in = new ObjectInputStream(fileIn);
				map = (MapElement) in.readObject();
				EM.rendermap(map);
				in.close();
				fileIn.close();
			}catch(IOException i)
			{
				i.printStackTrace();
				return;
			}catch(ClassNotFoundException c)
			{
				c.printStackTrace();
				return;
			}
		}

		else{
			game = new GameElement();
			try
			{
				FileInputStream fileIn =
						new FileInputStream(input);
				ObjectInputStream in = new ObjectInputStream(fileIn);
				game = (GameElement) in.readObject();
				in.close();
				fileIn.close();
			}catch(IOException i)
			{
				i.printStackTrace();
				return;
			}catch(ClassNotFoundException c)
			{
				c.printStackTrace();
				return;
			}
		}
	}