Java examples for Swing:JButton
set Swing Button Standard Size
import java.awt.Dimension; import java.lang.String; import javax.swing.AbstractButton; import javax.swing.UIManager; public class Main{ static final Dimension MULTI_LINE_BUTTON_DIM = UIParameters.INSTANCE .getButtonDimension();/*from ww w .ja v a 2s .c o m*/ final static void setStandardSize(AbstractButton button) { button.setPreferredSize(ButtonHelper.MULTI_LINE_BUTTON_DIM); button.setMaximumSize(ButtonHelper.MULTI_LINE_BUTTON_DIM); button.setMinimumSize(ButtonHelper.MULTI_LINE_BUTTON_DIM); } }