List of usage examples for javax.swing AbstractButton setDisabledIcon
@BeanProperty(visualUpdate = true, description = "The disabled icon for the button.") public void setDisabledIcon(Icon disabledIcon)
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JToggleButton("Press Me"); jb.setDisabledIcon(new MyIcon()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb);//from w w w .j av a 2s. c om f.pack(); f.setVisible(true); }