void (Graphics g) { super.paintComponent(g); if (myToolbar != null && myToolbar.getParent() == this && myContent != null && myContent.getParent() == this) { g.setColor(JBColor.border()); if (ExperimentalUI.isNewUI()) { //don't draw line for scrolled content if (Boolean.FALSE.equals(ClientProperty.get(myContent, SCROLLED_STATE))) { return; } } if (myVertical) { int y = (int)myToolbar.getBounds().getMaxY(); LinePainter2D.paint((Graphics2D)g, 0, y, getWidth(), y); } else { int x = (int)myToolbar.getBounds().getMaxX(); LinePainter2D.paint((Graphics2D)g, x, 0, x, getHeight()); } } }