JXButton setText not updating button text with background painter
I am using several JXButtons for which I am setting background painters (a matte painter with a linear gradient paint). When I have the painter set and I try to change the text with setText, the text simply does not change. I have tried to getText() on the JXButton and it shows the updated value, but the button does not display it. When I do not set a painter, the button text updates fine.
Is there something that I am missing to get this to work correctly? I did try calling repaint() on it.