private void deleteAt(MouseEvent arg0) {
		System.out.println("gonna click");
		Iterator<Map.Entry<Integer, Point>> it = panel.rectangles.entrySet().iterator();
		ClassSubInstance instance = null;
		Point click_point = arg0.getPoint();
		while(it.hasNext()) {
			Map.Entry<Integer, Point> entry = it.next();
			Point p = entry.getValue();
			ClassSubInstance c = model.classes.get(entry.getKey());
			
			if(click_point.x >= (p.x-5) && click_point.x <= (p.x + 195) &&
					click_point.y >= (p.y-5) && 
					click_point.y <= (p.y+25+(c.meta.attributes.size()+c.meta.enums.size())*30)) {
				instance = c;
			}
		}
		
		ArrayList<AssociationSubInstance> assocs = model.getAllAssocsRelatedTo(instance.id);
		
		for(int i = 0; i < assocs.size(); ++i) {
			panel.lines.remove(assocs.get(i).id);
			model.assocs.remove(assocs.get(i));
		}
		
		ArrayList<JComponent> associated_components = class_components.get(instance.id);
		
		for(int i = 0; i < associated_components.size(); ++i)
			panel.remove(associated_components.get(i));
		
		class_components.remove(instance.id);
		
		panel.rectangles.remove(instance.id);
		model.classes.remove(instance.id);
		panel.revalidate();
		panel.repaint();
	}