-1

I was looking for answer for a while and i simply cannot find it. Any knows how can i remove the gap that is in the end of line of tabs in JTabbedPane?

When I add many different tabs so there are like 3 lines and every got such gap in the end as it would not fit the container the JTabbedPane is in.

I use a lil bit changed BasicJTabbedPaneUI but without my own UI problem still remains.

Picture of Gap

Wonder if i have to rewrite paintTabArea method or there is some other way to do it.

Thanks in advance !

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Jackie
  • 5
  • 6

1 Answers1

1

The tab width handling is done by BasicTabbedPaneUI.TabbedPaneLayout. Since you already use a custom UI you can as well modify the layout too. Take a look especially at calculateTabAreaWidth().

kiheru
  • 6,588
  • 25
  • 31