I have a program that detects when certain machines are online and creates a button with a green “online” icon to show this. I want to add the functionality to check periodically if this machine is still online, and if it’s not, change the icon to the “offline” icon that I’ve already defined.
Share
probably you have issues with Concurency in Swing, that means that all Swing code must be done on EDT
then you have to wrap
myButton.setIcon(myIcon)to theinvokeLater(), for example