I have designed a tabbedpane which includes some tabs, is there any way to set a font for the titles of tabs?
I have read this useful question however through this approach we can only set the title of border and not the title of a tab.
A simple code to explain my problem:
private JTabbedPane tabbedPane;
private JPanel tab1;
private Jpanel tab2;
...
tabbedPane.insert("title1", icon1, tab1, "tip1", 0);
tabbedPane.insert("title2", icon2, tab2, "tip2", 1);
How can I change the font of "title1" or "title2" ?
Edit:
According to answer of Dear Jay Smith, I realized that this approach is more powerful, however I have some other problem, see this picture please:

I am create a JPanel (i.e. called myPanel) for each tab which consist of two JLabel, one for TabIcon and another for TabTitle. finally, I have writed this:
tabbedPane.setTabComponentAt(0, myPanel);
Now, what are problems:
It is too easy my friend. Do the following and you are through.
JTabbedPane tabbedPane = new JTabbedPane();
tabbedPane.setFont( new Font( "Dialog", Font.BOLD|Font.ITALIC, 24 ) );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With