Example usage for javax.swing AbstractButton getSelectedIcon

List of usage examples for javax.swing AbstractButton getSelectedIcon

Introduction

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

Prototype

public Icon getSelectedIcon() 

Source Link

Document

Returns the selected icon for the button.

Usage

From source file:Main.java

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

    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(jb);/*from   w  ww  .  j av  a2 s.  c om*/
    f.pack();
    f.setVisible(true);
}