Java tutorial
//package com.java2s; import java.awt.Component; import java.awt.Font; public class Main { /** * Tries to derive a default header font from given context. * * @param context * @return */ public static Font deriveHeader2(Component context) { return context.getFont().deriveFont(Font.BOLD, 12); } }