Rectangle (SingleRowPassInfo data) { Dimension entryPointSize = myTabs.getEntryPointPreferredSize(); Insets insets = myTabs.getActionsInsets(); if (ExperimentalUI.isNewUI()) { return new Rectangle(data.layoutSize.width - entryPointSize.width - insets.right, myTabs.getHeight() - entryPointSize.height - data.insets.bottom - insets.bottom, entryPointSize.width, entryPointSize.height); } else { return new Rectangle(data.layoutSize.width - myTabs.getHeaderFitSize().width, myTabs.getHeight() - entryPointSize.height - data.insets.bottom - insets.bottom, myTabs.getHeaderFitSize().width, entryPointSize.height); } }