If on is true, change the background. But what happens is it flickers - I think it’s because it detects multiple mouseclicks and goes on, off, on, off. How do we avoid this? Do I need a delay term? It works, but I only need it to do one switch from on to off or off to on per click (not multiple).
Thanks! Works well now, I just included a void mousePressed term within the class and a void mousePressed term out as well which calls the button’s mousepress function.