int (JTabbedPane pane, int x, int y) { if (myShowHiddenTabsButton != null) { Point p = new Point(x, y); JViewport viewport = getScrollableTabViewport(); if (viewport != null) { Point vpp = viewport.getLocation(); Point viewp = viewport.getViewPosition(); p.x = x - vpp.x + viewp.x; p.y = y - vpp.y + viewp.y; } x = p.x; y = p.y; } return super.tabForCoordinate(pane, x, y); }