Here you can find the source of SetStandardSizeForButton(JButton btn)
public static JButton SetStandardSizeForButton(JButton btn)
//package com.java2s; //License from project: Open Source License import java.awt.Dimension; import java.awt.Font; import javax.swing.JButton; import javax.swing.SwingConstants; public class Main { public static JButton SetStandardSizeForButton(JButton btn) { btn.setMaximumSize(new Dimension(95, 95)); btn.setMinimumSize(new Dimension(95, 95)); btn.setHorizontalTextPosition(SwingConstants.CENTER); btn.setVerticalTextPosition(SwingConstants.BOTTOM); btn.setFont(new Font("Arial", Font.PLAIN, 10)); return btn; }/*from w ww.j a v a 2s. co m*/ }