private void drawBlock(Graphics2D g, double x, GraphBlock gb) { double y0 = getTimeY(gb.getStartTime()); double y1 = getTimeY(gb.getEndTime()); double x0 = x - active_width / 2; Color c = getThreadBlockColor(gb.getThread()); Rectangle2D r = new Rectangle2D.Double(x0, y0, active_width, y1 - y0); g.setColor(c); g.fill(r); }