Here you can find the source of setTextStyle(JTextComponent txt)
public static void setTextStyle(JTextComponent txt)
//package com.java2s; //License from project: Academic Free License import java.awt.Color; import java.awt.Component; import java.awt.Font; import javax.swing.text.JTextComponent; public class Main { public static Color BACKGROUND = new Color(35, 34, 32); public static Color BASIC_TEXT_COLOR = new Color(221, 224, 193); private static Font BASIC_FONT = null; public static void setTextStyle(JTextComponent txt) { getBasicFont();//from w w w . j a va 2s.c om txt.setFont(BASIC_FONT); txt.setForeground(BASIC_TEXT_COLOR); txt.setBackground(BACKGROUND); } public static Font getBasicFont() { if (BASIC_FONT == null) { BASIC_FONT = Font.getFont("Verdana"); } return BASIC_FONT; } public static void setBackground(Component comp) { comp.setBackground(BACKGROUND); } }