List of usage examples for javax.swing AbstractButton setIconTextGap
@BeanProperty(visualUpdate = true, description = "If both the icon and text properties are set, this property defines the space between them.") public void setIconTextGap(int iconTextGap)
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JButton("Press Me"); jb.setIcon(new MyIcon()); jb.setIconTextGap(50); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);/*from ww w. j av a 2 s. co m*/ f.pack(); f.setVisible(true); }