I have a button where, when it's pushed, in a MouseEvent.CLICK listener,
I toggle it between two states with different icons, as below.
When I do this, it works, but get a flicker; for a brief
moment the icon is not in the center of the button.
I used to do this by setting the "icon" style instead, referencing an
embedded image. But I wanted to pull the reference to the icon file
out into a style.
Is there hope for me?
thisLockButton.setStyle("styleName", "lockUnlockButtonLocked"); or
I discovered a solution. If I user callLater to defer the changing of the button
style, it works better. Thanks for listening.