I know the button has getBounds (), does the tabs have something similar?
See the getTabBounds() BasicTabbedPaneUI . You do not need to configure the class just to get this data. You only need to customize the user interface if you intend to do animation with the user interface.
The problem is that the size of the tab will be just the size of the text. This way, you will not have empty space for your icon unless you add a blank icon to the tab. If you intend to do this, you can use the Animatied Icon class, which allows you to combine icons to perform animations.
source share