getIcon()
will return the default icon, but getDisabledIcon()
will return the disabled icon.
Also
getDisabledSelectedIcon()
returns the icon used by the button when it's disabled and selected. If no disabled selection icon has been set, this will forward the call to the LookAndFeel to construct an appropriate disabled Icon from the selection icon if it has been set and to getDisabledIcon() otherwise.
Some look and feels might not render the disabled selected Icon, in which case they will ignore this.
Then there is getPressedIcon()
, getRollOverIcon()
and getRolloverSelecedIcon()
.
Check the AbstractButton manual page.
As you can see there are many options available to you. On the other hand, you probably are the one who has set the icons, so if you may keep them in an Icon array, you could get them straight from there.