public static void disposeAll(Class<? extends Component> clz){
        for(Set<Component> components : frames.values()){
            Set<Component> disposal=new HashSet<Component>();
            for(Component component : components){
                if(component.getClass().equals(clz)){
                    disposal.add(component);
                }
            }
            for(Component component : disposal){
                dispose(component);
            }
        }
    }