List of usage examples for javax.swing AbstractButton setRolloverIcon
@BeanProperty(visualUpdate = true, description = "The rollover icon for the button.") public void setRolloverIcon(Icon rolloverIcon)
From source file:Main.java
public static void main(String[] args) { AbstractButton jb = new JToggleButton("Press Me"); jb.setRolloverEnabled(true);/*from w ww . ja v a 2 s . com*/ jb.setRolloverIcon(new MyIcon()); JFrame f = new JFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(jb); f.pack(); f.setVisible(true); }