Example usage for javax.swing AbstractButton getDisabledIcon

List of usage examples for javax.swing AbstractButton getDisabledIcon

Introduction

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

Prototype

@Transient
public Icon getDisabledIcon() 

Source Link

Document

Returns the icon used by the button when it's disabled.

Usage

From source file:Main.java

public static void main(String[] args) {
    AbstractButton jb = new JToggleButton("Press Me");
    System.out.println(jb.getDisabledIcon());

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