Java examples for 2D Graphics:Font
Create Bold Font
import java.applet.Applet; import java.awt.Font; import java.awt.Graphics; public class Main { public void paint(Graphics g) { Font myFont = new Font("Courier", Font.BOLD,20); g.setFont(myFont);/*from w w w . j a va2s. c o m*/ g.drawString("Bold Font Example", 10, 50); } }