Java examples for java.awt:Font
create AWT Bold Font
//package com.java2s; import java.awt.Font; public class Main { public static Font createBoldFont(Font font) { if (font == null) { throw new NullPointerException("font == null"); }//from ww w.j a v a 2 s .c o m String fontName = font.getName(); int fontSize = font.getSize(); return new Font(fontName, Font.BOLD, fontSize); } }