Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get coordinates of a tab header in the jTabbedPane?

I have a method that draws animated image on glass pane to simulate pulsing of an icon. It needs an image (i use icons of components) and bounds (of a button f.e.). I need this area:

enter image description here

I know that button has getBounds(), does tabs have something similar? Or maybe coordinates of an Icon. Either would be nice.

like image 784
bunnyjesse112 Avatar asked Dec 27 '22 08:12

bunnyjesse112


1 Answers

I had a similar problem. I needed height of tab. int tabHeight = myTabPanel.getUI().getTabBounds(myTabPanel, 0).height;.

like image 75
Krzysztof Szewczyk Avatar answered Dec 31 '22 14:12

Krzysztof Szewczyk