This question is similar and gives the answer: How to get the default font for Swing JTabbedPane shortcuts?
I'm not quite sure what the key would be, but after this answer you can try:
UIManager.getLookAndFeelDefaults().getFont("ToggleButton.font");
EDIT
This is not a snippet of a related question, but after a little testing, it seems equivalent:
UIManager.getDefaults().getFont("ToggleButton.font");
which is the code provided in the related question.
EDIT 2
I think I found a solution. The default return value is just the regular font I got in the line example:
this.setFont(UIManager.getDefaults().getFont("ToggleButton.font").deriveFont(this.getFont().getStyle(), this.getFont().getSize()));
My suggestion (to make this not so ugly) adds some private properties for the standard style and default font size for your class (and you can set them in the constructor):
fontStyle = this.getFont().getStyle(); fontSize = this.getFont().getSize();
And then you can clear:
this.setFont(UIManager.getDefaults().getFont("ToggleButton.font").deriveFont(this.fontStyle, this.fontSize));
source share