public void paintComponent(Graphics g) {
	    super.paintComponent(g);
	    Graphics2D g2d = (Graphics2D)g;
	    paintBackground(g2d);
	    if (this.box.isEmpty()) {
	      return;
	    }
	    int days = getDays(this.minDate, this.maxDate);
	    if (days > 0) {
	      paintDateGrid(g2d);
	      int strokeWidth = 8;
	      BasicStroke stroke = new BasicStroke(strokeWidth, 2, 2);
	      for (int i = 0; i < getRowCount(); i++) {
	        Element element = getElementByRowIndex(i);
	        if ((element instanceof Task)) {
	          Task task = (Task)element;
	          Date startDate = task.getStartDate();
	          Date endDate = task.getEndDate();
	          if ((startDate != null) && (endDate != null)) {
	            int taskDays = getDays(startDate, endDate);
	            if (taskDays > 0) {
	              int x1 = getDateX(startDate);
	              int x2 = getDateX(endDate);
	              x2 += this.dayWidth;
	              int treeColumnWidth = getGanttBounds().x;
	              x1 = Math.max(treeColumnWidth, x1);
	              x2 = Math.max(treeColumnWidth, x2);
	              if (x1 < x2) {
	                x1 += strokeWidth / 2 + this.gap;
	                x2 -= strokeWidth / 2 + this.gap;
	                int y = getCellRect(i, 1, true).y + getRowHeight(i) / 2;
	                Line2D.Double line = new Line2D.Double(x1, y, x2, y);
	                Shape shape = stroke.createStrokedShape(line);
	                if (task.getColor() != null)
	                  g2d.setColor(task.getColor());
	                else {
	                  g2d.setColor(Color.lightGray);
	                }
	                g2d.fill(shape);
	                g2d.setColor(Color.black);
	                g2d.setStroke(new BasicStroke(1.0F));
	                g2d.draw(shape);
	              }
	            }
	          }
	        }
	      }
	    }
	  }