Here you can find the source of setMonospacedFont(JComponent component)
public static void setMonospacedFont(JComponent component)
//package com.java2s; //License from project: Open Source License import java.awt.Font; import javax.swing.JComponent; public class Main { private static final Font MONOSPACED_FONT = Font.decode("Monospaced"); public static void setMonospacedFont(JComponent component) { if (MONOSPACED_FONT != null) component.setFont(MONOSPACED_FONT); }// w ww . j av a2s.c o m }