public Point pointAt(final JTabbedPane tabbedPane, final int index) {
validateIndex(tabbedPane, index);
Rectangle rect = tabbedPane.getUI().getTabBounds(tabbedPane, index);
// From Abbot: TODO figure out the effects of tab layout policy sometimes tabs are not directly visible
if (rect == null || rect.x < 0)
throw new LocationUnavailableException(concat("The tab '", valueOf(index), "' is not visible"));
return new Point(rect.x + rect.width / 2, rect.y + rect.height / 2);
}