java font class code example Example: java font setFont (new Font ("TimesRoman", Font.BOLD/Font.PLAIN/Font.ITALIC, 20));