Property (final int x, final int y) { final JTabbedPane tabbedPane = getTabbedPane(); final TabbedPaneUI ui = tabbedPane.getUI(); LOG.assertTrue(ui != null); final int index = ui.tabForCoordinate(tabbedPane, x, y); return index != -1 ? new MyTitleProperty(null, index) : null; }