h -= (y - insets.top);
h -= y - insets.top;
  protected void paintContentBorder(Graphics g, int tabPlacement,                                    int selectedIndex)  {    int width = tabPane.getWidth();    int height = tabPane.getHeight();    Insets insets = tabPane.getInsets();    Insets tabAreaInsets = getTabAreaInsets(tabPlacement);    // Calculate coordinates of content area.    int x = insets.left;    int y = insets.top;    int w = width - insets.left - insets.right;    int h = height - insets.top - insets.bottom;    switch (tabPlacement)    {    case LEFT:      x += calculateTabAreaWidth(tabPlacement, runCount, maxTabWidth);      w -= (x - insets.left);      break;    case RIGHT:      w -= calculateTabAreaWidth(tabPlacement, runCount, maxTabWidth);      break;    case BOTTOM:      h -= calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight);      break;    case TOP:    default:      y += calculateTabAreaHeight(tabPlacement, runCount, maxTabHeight);      h -= (y - insets.top);    }    // Fill background if necessary.    if (tabPane.isOpaque())      {        Color bg = UIManager.getColor("TabbedPane.contentAreaColor");        g.setColor(bg);        g.fillRect(x, y, w, h);      }    // Paint border.    paintContentBorderTopEdge(g, tabPlacement, selectedIndex, x, y, w, h);    paintContentBorderLeftEdge(g, tabPlacement, selectedIndex, x, y, w, h);    paintContentBorderBottomEdge(g, tabPlacement, selectedIndex, x, y, w, h);    paintContentBorderRightEdge(g, tabPlacement, selectedIndex, x, y, w, h);  }