Example usage for javax.swing AbstractButton setDisabledSelectedIcon

List of usage examples for javax.swing AbstractButton setDisabledSelectedIcon

Introduction

In this page you can find the example usage for javax.swing AbstractButton setDisabledSelectedIcon.

Prototype

@BeanProperty(visualUpdate = true, description = "The disabled selection icon for the button.")
public void setDisabledSelectedIcon(Icon disabledSelectedIcon) 

Source Link

Document

Sets the disabled selection icon for the button.

Usage

From source file:Main.java

public static void main(String[] args) {
    AbstractButton jb = new JToggleButton("Press Me");
    jb.setDisabledSelectedIcon(new MyIcon());

    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(jb);//from  w ww  .  j av  a  2 s.  c  o  m
    f.pack();
    f.setVisible(true);
}