void (Rectangle bounds) { Component header = getHeader(); if (header != null) { int h = header.getPreferredSize().height; if (bounds.y < h) { bounds = new Rectangle(bounds); bounds.y -= h; bounds.height += h; } } super.scrollRectToVisible(bounds); }