I use the follow code
to get the color for setting background of a label. It seems work fine for Windows system but on Mac system, it returns a color already disposed and hence, eventually it gives
java.lang.IllegalArgumentException: Argument not valid
What should be the explanation for it and how should I do it more properly?