void (Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) { if (tabPlacement == TOP || myPaintContentBorder) { boolean leftToRight = isLeftToRight(tabPane); int right = x + w - 1; Rectangle selRect = selectedIndex < 0 ? null : getTabBounds(selectedIndex, calcRect); g.setColor(darkShadow); // Draw unbroken line if tabs are not on TOP, OR // selected tab is not in run adjacent to content, OR // selected tab is not visible (SCROLL_TAB_LAYOUT) // if (tabPlacement != TOP || selectedIndex < 0 || (selRect.y + selRect.height + 1 < y) || (selRect.x < x || selRect.x > x + w)) { LinePainter2D.paint((Graphics2D)g, x, y, x + w - 1, y); } else { // Break line to show visual connection to selected tab boolean lastInRun = isLastInRun(selectedIndex); LinePainter2D.paint((Graphics2D)g, x, y, selRect.x, y); if (selRect.x + selRect.width < right - 1) { LinePainter2D.paint((Graphics2D)g, selRect.x + selRect.width - 2, y, right, y); } else { LinePainter2D.paint((Graphics2D)g, x + w - 2, y, x + w - 2, y); } } } }