List of usage examples for javax.swing AbstractButton setIgnoreRepaint
public void setIgnoreRepaint(boolean ignoreRepaint)
From source file:SoundManagerTest.java
/** * Creates a button (either JButton or JToggleButton). */// w ww . ja v a 2s. c om public AbstractButton createButton(String name, boolean canToggle) { AbstractButton button; if (canToggle) { button = new JToggleButton(name); } else { button = new JButton(name); } button.addActionListener(this); button.setIgnoreRepaint(true); button.setFocusable(false); return button; }