diff --git a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java index 490d1dff7c5..03526490d95 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthTabbedPaneUI.java @@ -837,6 +837,9 @@ public class SynthTabbedPaneUI extends BasicTabbedPaneUI } private FontMetrics getFontMetrics(Font font) { + if (font == null) { + font = tabPane.getFont(); + } return tabPane.getFontMetrics(font); }