public boolean checkRightType(Environment env, Component source){
    	if(env.myObjects.size() == 0) return false;
    	 Object first = env.myObjects.get(0);
         int firstType = findType(first);
         for(int i = 0; i < env.myObjects.size(); i++){
         	int curType = findType(env.myObjects.get(i));     
         	if(curType == 0){
         		JOptionPane.showMessageDialog(source, "This feature only works with Finite Automata, Pushdown Automata, and Turing Machines", "Error",
                     JOptionPane.ERROR_MESSAGE);
         		return false;
         	}
         	else if(firstType != curType){
         		JOptionPane.showMessageDialog(source, "Files Must Be The Same Type", "Error",
                         JOptionPane.ERROR_MESSAGE);
         		return false;
         	}
         }
         return true;
    }