Changing Image Icon of a JButton at run time, NOT state dependent
I need to change the Image Icon of a JButton. I know there are built in methods to change the Icon when it is in a certain state (i.e. pressed, scrolled over, etc). But I need it to change when another method tells it to.
Basically an action happens, a method decides what to change the JButton's Image Icon to (depending on what happens in the action), then it changes it. That's what I want in theory, anyways.
Are there any simple solutions to this?