JTabbedPane: change tab size when change tab title
问题 I have a a JTabbedPane myTab within my JFrame. Its first tab has a title of "old title". I want to change the title dynamically, so I use this code to set: myTab.setTitleAt(myTab.getSelectedIndex(), "my full new title"); And somehow my new title is longer than my old one. The problem is, the tab size does not change, and it does not display the new title fully, only "my full n...". And if I click on the tab, suddenly the tab can show full new title. I already tried this code too, to set the