public void addMonster(){
		int x;
		int y;
		String s = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give x and y coordinates\n"
                + "Seperated by /",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		
		if ((s != null) && (s.length() > 0) && (s.contains("/"))) {
			String[] sar = s.split("/");
			try{
				x = Integer.parseInt(sar[0]);
				y = Integer.parseInt(sar[1]);
			}catch(NumberFormatException e){
				return;
			}
		}else{
			JOptionPane.showMessageDialog(mainWindow, "Input not valid");
			return;
		}
		String name = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give the name of the monster",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		String sprite = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give the sprite name of the monster",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		sprite = "res\\" + sprite + ".png";
		String h = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give the health of the monster",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		int health;
		try{
			health = Integer.parseInt(h);
    	}catch(NumberFormatException e){
    		return;
    	}
		String a = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give the attack of the monster",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		int attack;
		try{
			attack = Integer.parseInt(a);
    	}catch(NumberFormatException e){
    		return;
    	}
		String d = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give the defence of the monster",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		int defence;
		try{
			defence = Integer.parseInt(d);
    	}catch(NumberFormatException e){
    		return;
    	}
		String w = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give the weapon attack for the monster",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		int weapon;
		try{
			weapon = Integer.parseInt(w);
    	}catch(NumberFormatException e){
    		return;
    	}
		String ar = (String)JOptionPane.showInputDialog(
                mainWindow,
                "Give the armor defence for the monster",
                "Add monster",
                JOptionPane.PLAIN_MESSAGE,
                null,null,"");
		int armor;
		try{
			armor = Integer.parseInt(ar);
    	}catch(NumberFormatException e){
    		return;
    	}
		Monster2D m = new Monster2D(name, health, attack, defence, weapon, armor, new SerializableBufferedImage(sprite));
		m.setLocation(new Point(x,y));
		monsters.add(m);
	}