if (tabPlacement == SwingConstants.TOP) {
  protected void paintContentBorderTopEdge(Graphics g, int tabPlacement,                                           int selectedIndex, int x, int y,                                           int w, int h)  {    Color saved = g.getColor();    g.setColor(lightHighlight);    int startgap = rects[selectedIndex].x;    int endgap = rects[selectedIndex].x + rects[selectedIndex].width;    int diff = 0;    if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)      {	Point p = findPointForIndex(currentScrollLocation);	diff = p.x;      }    if (tabPlacement == SwingConstants.TOP)      {	g.drawLine(x, y, startgap - diff, y);	g.drawLine(endgap - diff, y, x + w, y);      }    else      g.drawLine(x, y, x + w, y);    g.setColor(saved);  }