Here you can find the source of createButton16(final ImageIcon icon)
public static JButton createButton16(final ImageIcon icon)
//package com.java2s; import java.awt.Dimension; import java.awt.Insets; import javax.swing.ImageIcon; import javax.swing.JButton; public class Main { public static JButton createButton16(final ImageIcon icon) { return createButton16(icon, null); }/* w w w . ja v a 2 s . co m*/ public static JButton createButton16(final ImageIcon icon, final String toolTip) { final JButton newButton = new JButton(); newButton.setMargin(new Insets(0, 0, 0, 0)); newButton.setMinimumSize(new Dimension(16, 16)); if (toolTip != null) { newButton.setToolTipText(toolTip); } newButton.setIcon(icon); return newButton; } }