I'd like to get the current font used by my GUI to create a bold version of it. Which of the following solutions is to be preferred using pure Swing and why?
Font font = ...
somethingExtendsAwtComponent.getFont();UIManager.getLookAndFeel().getDefaults().getFont("defaultFont");UIManager.getLookAndFeelDefaults().getFont("defaultFont");UIManager.getDefaults().getFont("defaultFont");
The Javadocs are not very helpful, only saying that 4. is to be used instead of 3. because alterations on the UIDefaults object returned can result in incorrect behavior, something that isn't the case here.