public void paintComponent(Graphics g){
		super.paintComponent(g);
		this.g=g;
		
		
		for (int i=0; i<model.getAssociationList().size(); i++){
			drawAssociation(i,g);
		}
		
		
		for (int i=0; i<model.objectsListSize(); i++){
			int positionX=model.getObjectUmlAtIndex(i).getX();
			int positionY=model.getObjectUmlAtIndex(i).getY();
			
			ObjectUML obj = model.getObjectUmlAtIndex(i);
			

					
			//Choose the color according to the type of the object
			Color color=new Color(228,228,228);
			TypeObject typeObj = model.getObjectUmlAtIndex(i).getObjectType();
			
			if (typeObj==TypeObject.CLASS) color =new Color(228,228,228);
			else if (typeObj==TypeObject.INTERFACE)  color = new Color(183,229,255);
			else if (typeObj==TypeObject.ABSTRACT_CLASS) color = new Color(255,183,183);

			g.setColor(color);
			
			g.fillRect(positionX, positionY, maxLength(i, g)+40, 30);

			//Draw square grey on the left top
			g.setColor(Color.GRAY);
			g.fillRect(positionX, positionY, 10, 10);
			g.setColor(Color.BLACK);
			g.drawRect(positionX, positionY, 10, 10);
			
			//Draw square grey on the right top (quit zone)
			g.setColor(Color.RED);
			g.fillRect(positionX+maxLength(i, g)+30, positionY, 10, 10);
			g.setColor(Color.BLACK);
			g.drawRect(positionX+maxLength(i, g)+30, positionY, 10, 10);
			g.drawString("x", positionX+maxLength(i, g)+32, positionY+9);

			g.setColor(Color.BLACK);
			g.drawRect(positionX, positionY,maxLength(i, g)+40 , 30);

			//Warning => The position in the method is the point in the left bottom of the text
			if (model.getNameSelected()==i) g.setColor(Color.RED);
			else g.setColor(Color.BLACK);
			g.drawString(obj.getName(), positionX+20, positionY+20);
			
			//Write if the class if abstract or a interface
			g.setColor(Color.BLACK);
			if (obj.getObjectType()==TypeObject.INTERFACE){
				g.drawString("<<Interface>>", positionX+10, positionY -5);
			} else if(obj.getObjectType()==TypeObject.ABSTRACT_CLASS){
				g.drawString("Abstract", positionX+20, positionY-5);
			}
			positionY=positionY+30;
			positionY=drawAttribute(obj, i, g, color, positionX,positionY);
			positionY=drawMethod(obj, i, g, color, positionX, positionY);
		}
		
	}