repaint swing button with different gradient

The easiest approach is to use setPressedIcon(), but you can also override paint() in the ButtonUI delegate, as shown in this example.

Leave a Comment