@Override
	protected void paintComponent(Graphics g) {
		
		super.paintComponent(g);
		
		Graphics2D g2d = (Graphics2D) g;

		if(list != null && list.size() > 0){
			g2d.setColor(getBackground());
			g2d.fillRect(0, 0, getWidth(), getHeight());
			n = 1;
			
			output = drawSegments(g2d, list);
		}
	}