Here you can find the source of setButtonStyle(AbstractButton btn)
public static void setButtonStyle(AbstractButton btn)
//package com.java2s; //License from project: Academic Free License import java.awt.Color; import java.awt.Component; import java.awt.Font; import javax.swing.AbstractButton; public class Main { public static Color BACKGROUND = new Color(35, 34, 32); public static Color BASIC_BUTTON_COLOR = new Color(255, 94, 5); private static Font BASIC_FONT = null; public static void setButtonStyle(AbstractButton btn) { getBasicFont();//from w w w .java 2 s.c o m btn.setFont(BASIC_FONT); btn.setForeground(BASIC_BUTTON_COLOR); btn.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); } }