Java tutorial
//package com.java2s; import java.awt.Font; public class Main { public static String getStyleFromInteger(int style) { if (style == Font.BOLD) return "BOLD"; else if (style == Font.ITALIC) return "ITALIC"; else return "PLAIN"; } }