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